feat: add public ColorArea components, docs, and package contract
This commit is contained in:
@@ -171,9 +171,19 @@ describe("immutable private color value boundary", () => {
|
||||
});
|
||||
it("resolves legal space defaults and rejects duplicate/mismatched axes", () => {
|
||||
expect(colorAxes(parseColor("#f00"))).toMatchObject({
|
||||
space: "rgb",
|
||||
x: "red",
|
||||
y: "green",
|
||||
});
|
||||
expect(colorAxes(parseColor("hsl(200, 50%, 50%)"))).toMatchObject({
|
||||
space: "hsl",
|
||||
x: "hue",
|
||||
y: "saturation",
|
||||
});
|
||||
expect(colorAxes(parseColor("hsb(240, 50%, 50%)"))).toMatchObject({
|
||||
space: "hsb",
|
||||
x: "saturation",
|
||||
y: "brightness",
|
||||
x: "hue",
|
||||
y: "saturation",
|
||||
});
|
||||
expect(colorAxes(parseColor("#f00"), "rgb")).toMatchObject({
|
||||
x: "red",
|
||||
|
||||
Reference in New Issue
Block a user