Skip to content

A few questions on Color #489

Answered by postspectacular
cdaein asked this question in Q&A
Aug 17, 2024 · 3 comments · 4 replies
Discussion options

You must be logged in to vote

Hey @cdaein — sorry for the delay (had to get a new release out first), here's an attempt to explain why your 3 colors make sense the way they're dealt with right now:

When you create a color (any type) in the form rgb(a,b,c) or rgb([a, b, c]) then the values given are assumed to be in that intended color space already. For example, if I create hsl(0,1,0.5) (or same for hsl([0,1,0.5])), then the values given are interpreted as H,S,L, as you'd expect.... The only time an automatic conversion happens is if you pass a color of a different type as argument, e.g. as in your colC case, or if you'd pass a CSS string rgb("#abc"). In the latter case, the CSS color would first be parsed as integer,…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@cdaein
Comment options

@postspectacular
Comment options

@postspectacular
Comment options

Answer selected by cdaein
Comment options

You must be logged in to vote
1 reply
@cdaein
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants