Universally support CMYK colors #410

Closed
mikesax opened this Issue Oct 9, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@mikesax

mikesax commented Oct 9, 2012

While there is some limited support for CMYK colors, things like table cells currently only support background and border colors in RGB format. The "1 argument means RGB, 4 arguments means CMYK" convention in other color methods also makes it hard to support both RGB and CMYK in the same code (because the function calls are different, so you can't just pass a variable).

It would be great if the API would universally accept either a string (RGB) or an array of four floating point values (CMYK) as colors. I haven't looked at implementing this, but ideally the code that parses RGB colors could simply check if the argument was a string or an array.

"000000" in RGB, or [ 0.0, 0.0, 0.0, 1.0] for CMYK

@jonsgreen

This comment has been minimized.

Show comment Hide comment
@jonsgreen

jonsgreen Oct 27, 2012

Member

I think that this actually is already supported; you just have to know the API and be a bit creative with some things like border_color:

table([[{content: 'It works', background_color: [ 0, 99, 95, 5.0], border_color: Array.new(4, [0, 99, 95, 0])}]])

Let me know of any specific situations where this does not seem supported to you otherwise we can close this issue.

O

Member

jonsgreen commented Oct 27, 2012

I think that this actually is already supported; you just have to know the API and be a bit creative with some things like border_color:

table([[{content: 'It works', background_color: [ 0, 99, 95, 5.0], border_color: Array.new(4, [0, 99, 95, 0])}]])

Let me know of any specific situations where this does not seem supported to you otherwise we can close this issue.

O

@yob

This comment has been minimized.

Show comment Hide comment
@yob

yob Dec 8, 2012

Member

In general I think we could improve our color support (and CMYK in particular) but since this specific issues seems fixed I'll close it for now.

Please re-open the issue if it's not resolved.

Member

yob commented Dec 8, 2012

In general I think we could improve our color support (and CMYK in particular) but since this specific issues seems fixed I'll close it for now.

Please re-open the issue if it's not resolved.

@yob yob closed this Dec 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment