Commit Graph

8 Commits

Author SHA1 Message Date
Barry Warsaw 2e7a32046b rrggbb_to_triplet(), triplet_to_rrggbb(): Improvements given by GvR 1998-02-18 17:01:12 +00:00
Barry Warsaw 8d3e5ee552 Cache conversions from triplets to rrggbb's and vice versa. Wasteful
on space, but improves performance.  Also use map to calculate
triplet_to_pmwrgb().
1998-02-18 00:02:26 +00:00
Barry Warsaw 2662e15f58 triplet_to_pmwrgb(): New function 1998-02-13 21:27:56 +00:00
Barry Warsaw eb9b8af8fc __init__(): simplify, use tuple as key to __byrgb, lowercase __byname key.
find_byrgb(): Changed name, interface (takes a tuple), and return
value

find_byname(): lowercase color name
1998-02-11 18:55:37 +00:00
Barry Warsaw f4562a7a0a Simplification of conversion routines 1998-02-11 17:19:23 +00:00
Barry Warsaw 9f4d73a9cf BadColor: new exception class
rrggbb_to_triplet(): New utility function
1998-01-31 23:38:48 +00:00
Barry Warsaw bfbe67f47f Better implementation of nearest(). Not faster, but better 1998-01-31 00:32:07 +00:00
Barry Warsaw 2406b1d40a Initial revision 1998-01-31 00:29:41 +00:00