0

Well, the question is quite simple I think. I would like to specify colors using the HSV color model (https://en.wikipedia.org/wiki/HSL_and_HSV). However, all the cairo code seems to work exclusively with RGB / RGBA specifications. I could not find any ways to convert colors in gtk / gdk either. Am I missing something or is there some simple, portable way to convert colors (without additional libraries)?

hfhc2
  • 4,182
  • 2
  • 27
  • 56

1 Answers1

0

Convertion HSV to RGB is just a couple of lines of code, see for example here (no code) or this SO question.


But to answer your original question:

AFAIK cairo is entirly based on RGBA model, see cairo_format_t in manual.

Community
  • 1
  • 1
drahnr
  • 6,782
  • 5
  • 48
  • 75
  • Well, I would have appreciated it if the functionality were in cairo/gdk/gtk. But pasting SO code is probably ok too... – hfhc2 Apr 06 '14 at 19:38