Conversation
|
@Kronos9247 The reason this wasn't added to the Colour type originally is that the colour type is expressed as RGB underlying. Having a method on the Colour Type to convert to HSV is fine, as it takes a Colour and returns a table of HSV. However, adding a function which takes HSV, and returns RGB doesn't make sense when attached to the colour Type methods. It might make sense as a library utility function, or if you were to create a HSV type ( similar to colour ) and use that as a method. Would you be able to elaborate on your issue about it not doing the right operation for you? HSVToColor takes HSV, and produces it in RGB colour space. our EDIT: I would like to add, thank you for taking the time out to present this PR; You've clearly read, understood, and adhered to the Codestyle guidelines. Many people seem to gloss over that important document. We wish to encourage you to contribute in the future :) |
I wanted to use the HSVToColor() native Lua function. Then i noticed that the toHsv() function is not doing the right Operation for me so i wanted to add the HSVToColor.