[go: up one dir, main page]

Color Refactoring (extensions)

What does the merge request do?

Rewrites how colors are parsed and manipulated.

Implementation notes

There are some deprecations, some of these are to make restrictions similar to what is found in the C++ color code:

  1. Using color.to_rgba() is deprecated in favour of color.to_rgb().with_opacity()
  2. Making a color with Color([numbers]) without a color space is deprecated, use Color([numbers], "rgb") to be explicit.
  3. Empty colors in a color space (like rgb) will now not exist. Color() is "none" and Color().to_rgb() converts to black.

Summary for release notes

Support for this branch:

  • None type
  • RGB, hex, css-rgb, css-rgba, integers
  • Named, css-names
  • HSL, css-hsl, css-hsla
  • HSV, css-hwb, css-hwba
  • DeviceCMYK colors
  • icc-profile colors

Other colors are possible, but we're going to limit what we're supporting here for now to just the major components.

Checklist

  • Add unit tests (if applicable)
  • Changes to inkex/ are well documented
  • Clean merge request history
Edited by Martin Owens

Merge request reports

Loading