RGBtoHSB ( redPercentage ; greenPercentage ; bluePercentage )
Converts color from RGB percentages to HSB/HSV values.
Average rating: 4.1 (33 votes) Log in to vote
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function converts the specified color RGB percentages to hue, saturation, and brightness (HSB/HSV) values. (Note that HSB/HSV is not the same as HSL!)
Note that all values except hue are in decimals between 0 and 1, inclusively. RGB values on the 0-255 scale must be divided by 255 before using them in this function.
The math behind this function was inspired by formulas listed on Wikipedia.
Guy Foster, Fort Lauderdale, FL
Jan 28, 2012
Hi Joe, Entered your RGBtoHSB function into FM11 Advanced with no problem, but results are bizzare. Entered 239, 200, 16 as RGB numbers, divided all three by 255, passed parameters to function, answer:
Can I contact you directly for help. Be glad to pay. Have almost 5000 threads with only RGB numbers that I need to convert. Thx. email@example.com
PS: My second custom function, so new at this process.
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.