Skip to content

Commit

Permalink
add hex to color space
Browse files Browse the repository at this point in the history
  • Loading branch information
mck committed Dec 17, 2024
1 parent 79dc07b commit df74698
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/slow-lobsters-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tokens-studio/graph-engine": patch
---

Add hex to color space selector
4 changes: 2 additions & 2 deletions packages/graph-engine/src/nodes/color/colorToString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class NodeDefinition extends Node {

declare inputs: ToInput<{
color: ColorType;
space: 'srgb' | 'hsl' | 'hex';
space: string;
}>;
declare outputs: ToOutput<{
value: string;
Expand All @@ -29,7 +29,7 @@ export default class NodeDefinition extends Node {
this.addInput('space', {
type: {
...StringSchema,
enum: ColorSpaces,
enum: ['hex', ...ColorSpaces].toSorted(),
default: 'hex'
},
visible: false
Expand Down

0 comments on commit df74698

Please sign in to comment.