-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support CMYK colors #155
Comments
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
May 27, 2015
- parse CMYK color values in theme - parse CMYK color values in formatted text - avoid redundant processing of color values when loading theme - mixin color types into color values - show example of CMYK value in default theme - code formatting
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
May 27, 2015
- parse CMYK color values in theme - parse CMYK color values in formatted text - avoid redundant processing of color values when loading theme - mixin color types into color values - show example of CMYK value in default theme - code formatting
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
May 27, 2015
- parse CMYK color values in theme - parse CMYK color values in formatted text - avoid redundant processing of color values when loading theme - mixin color types into color values - show example of CMYK value in default theme - code formatting
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
May 27, 2015
- parse CMYK color values in theme - parse CMYK color values in formatted text - avoid redundant processing of color values when loading theme - mixin color types into color values - show example of CMYK value in default theme - code formatting
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
May 27, 2015
- parse CMYK color values in theme - parse CMYK color values in formatted text - avoid redundant processing of color values when loading theme - mixin color types into color values - show example of CMYK value in default theme - code formatting
mojavelinux
added a commit
that referenced
this issue
May 27, 2015
resolves #155 support CMYK color values
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Support CMYK colors in both the theme and the formatted text parser.
A CMYK color is specified as an array of 4 values in the theme.
Internally, Prawn treats CMYK values on a scale from 0 to 100. However, we want to conform to the (proposed) CSS spec, so we should convert the value accordingly.
If an individual value is greater than 1 or ends in
%
, then convert it to a number. If the value is 1 or less, then multiply it by 100.Examples:
Percentage values:
or, using shorthand,
Decimal values:
Formatted text
When passing a theme color through a string of formatted text using the
<color>
element, we need to recognize a CMYK array and treat it appropriately.For example:
Even though the attribute is
rgb
, the parser needs to recognize the CMYK value and preserve it.The text was updated successfully, but these errors were encountered: