Board index » delphi » Invert colors
Sanyin
Delphi Developer |
Sanyin
Delphi Developer |
Invert colors2007-03-28 08:50:28 PM delphi253 How to invert rgb, but NOT USING method 255-R,255-G, 255-B. instead i want always god and inverted contrast, also for 128,128,128 (rgb) |
Mike Williams (TeamB)
Delphi Developer |
2007-03-28 09:53:17 PM
Re:Invert colors
Sanyin writes:
QuoteHow to invert rgb, but NOT USING method -- -Mike (TeamB) |
John Herbster
Delphi Developer |
2007-03-28 10:13:50 PM
Re:Invert colors
"Sanyin" <XXXX@XXXXX.COM>wrote
QuoteI want always [good] and inverted contrast ... groups.google.com/groups groups.google.com/groups/search HTH, JohnH |
Chris Ueberall
Delphi Developer |
2007-03-28 10:56:23 PM
Re:Invert colors
Sanyin writes:
QuoteHow to invert rgb, but NOT USING method doesn't change and all colors near the center will have less contrast. -- Cheers, Chris Ueberall; |
Peter Below (TeamB)
Delphi Developer |
2007-03-29 03:41:55 AM
Re:Invert colors
Sanyin writes:
QuoteHow to invert rgb, but NOT USING method rgb_: TColorref; Function Inv( b: Byte ): Byte; Begin if b>128 Then result:= 0 else result:= 255; End; begin rgb_ := ColorToRgb( color ); rgb_ := RGB( Inv(GetRValue( rgb_ )), Inv(GetGValue( rgb_ )), Inv(GetBValue( rgb_ ))); Result := rgb_; end; -- Peter Below (TeamB) Don't be a vampire (slash7.com/pages/vampires), use the newsgroup archives : www.tamaracka.com/search.htm groups.google.com www.prolix.be |
Sanyin
Delphi Developer |
2007-03-29 03:25:50 PM
Re:Invert colors
"Peter Below (TeamB)" <none>writes
QuoteSanyin writes: |
Gary Williams
Delphi Developer |
2007-03-30 11:19:39 AM
Re:Invert colors
Sanyin writes:
QuoteHow to invert rgb, but NOT USING method return either white or black depending on some brightness threshold to obtain maximum contrast. -Gary |