forked from diagrams/diagrams-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalize Color class to absolute colors.
This addresses concerns raised in issue diagrams#66 by letting the backend choose which color space to render Color instances to. Functions are provided for backwards compatibility with the old semantics, which were to always render out to companded sRGB space.
- Loading branch information
nand
committed
Nov 20, 2012
1 parent
c7d2923
commit bfc8be9
Showing
1 changed file
with
30 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bfc8be9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just now getting a chance to look at this, it looks pretty good to me. Just to make sure I'm understanding right, this wouldn't necessitate any changes to existing backends (as long as they want to continue using sRGB), right?
bfc8be9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if they add new instances of Color. But yes, all they'd get is a DEPRECATED warning.
bfc8be9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right, so we should update backends to use
colorToSRGBA
instead ofcolorToRGBA
, but they will continue to work in the meantime.