FLTK logo

Re: [fltk/fltk] Not enough contrast on automatic colors (Issue #370)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] Not enough contrast on automatic colors (Issue #370) Albrecht Schlosser Jul 19, 2022  
 

FYI: I created mainly two new features:

  1. I added a new internal fl_contrast() variant that works better WRT visual contrast perception
  2. I added a function to enable users to implement and use their own "custom" fl_contrast() variant

The new 1.4 fl_contrast() function is based on the CIELAB color model and calculates the contrast value more according to human visual contrast perception, at least much better than the old 1.3 function. This new function linearizes the sRGB color values etc. as discussed above. This will be the new default fl_contrast() function.

The old 1.3 fl_contrast() function is still available but must be requested (opt-in). Although the new function is much better I left the old function because it may perform better (only integer arithmetic) than the new one that uses floating point arithmetic including pow(). This may be useful for embedded systems or otherwise CPU constrained systems (although I personally don't think that this would make a big difference).

Users will be able to implement and register their own fl_contrast_xxx() function which will be called internally whenever fl_contrast() is called. This would be an option for users wanting an even better contrast function.

APCA will not be available in FLTK 1.4.0 because of licensing constraints (this is how interpret their license). If the APCA license will be opened for other usage than web projects and not have even more restrictions we may implement APCA in the FLTK core as another option.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/370/1188952464@github.com>

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.