Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!ukc!harrier.ukc.ac.uk!rlh2 From: rlh2@ukc.ac.uk (Richard Hesketh) Newsgroups: comp.graphics Subject: looking for rgb <-> hsv converter code Keywords: RGB Hue Saturation Value Converter Message-ID: <2497@harrier.ukc.ac.uk> Date: 30 Sep 89 15:56:47 GMT Reply-To: rlh2@ukc.ac.uk (Richard Hesketh) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 20 I got some code from comp.windows.x the other week for doing rgb to hue saturation and value conversions. So I encorporated it into a small rgb palette editor .. so that you can see the relationship between rgb and hsv interactively. However the code produces inconsistent results. Which makes it difficult to use for a direct manipulation user interface where the user can change either rgb or hsv values via sliders and watch the corresponding sliders change. So has anybody got any code that does rgb to hsv and hsv to rgb value conversion, preferably in C although I'm willing to take Fortran 8-). Thanks in advance, Richard Richard Hesketh : rlh2@ukc.ac.uk ..!mcvax!ukc!rlh2 : @nsfnet-relay.ac.uk:rlh2@ukc.ac.uk --- Computing Lab., University of Kent at Canterbury, Canterbury, Kent, CT2 7NF, United Kingdom. Tel: (0227) 764000 ext. 3682