FLTK logo

STR #837

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 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]

STR #837

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:fl_contrast gives poor results
Version:1.1.6
Created By:ajapted
Assigned To:mike
Fix Version:1.1-current
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 mike
10:08 May 12, 2005
str837.patch
1k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 ajapted
04:25 Apr 28, 2005
I'm writing a small editor program with syntax
highlighting.  I want comment text to be bright
blue on the black background, but fl_contrast()
forces it to white.

The test performed by fl_contrast (in 1.1.6) looks
pretty ad-hoc to me.  It ignores the blue channel
completely, and the simple math ((A^B) & 0x80)
considers 0 and 127 as equal, but 127 and 128 as
a significant difference.

Hopefully this could be fixed ?
 
 
#2 mike
10:08 May 12, 2005
Fixed in Subversion repository.

Summary of fltk.bugs discussion: compute the luminosity and if the absolute difference is < 0.5, use the contrast color.

See attached patch...
 
     

Return to Bugs & Features ]

 
 

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'.