[ 
https://issues.apache.org/jira/browse/IMAGING-306?focusedWorklogId=736583&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-736583
 ]

ASF GitHub Bot logged work on IMAGING-306:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Mar/22 11:17
            Start Date: 04/Mar/22 11:17
    Worklog Time Spent: 10m 
      Work Description: kinow commented on pull request #206:
URL: https://github.com/apache/commons-imaging/pull/206#issuecomment-1059072459


   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 736583)
    Time Spent: 50m  (was: 40m)

> Constants in ColorHsv are not in tune with ColorConversions agorithms 
> ----------------------------------------------------------------------
>
>                 Key: IMAGING-306
>                 URL: https://issues.apache.org/jira/browse/IMAGING-306
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: imaging.color.*
>    Affects Versions: 1.0-alpha2
>            Reporter: Julien NICOL
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> ColorHsv.BLUE, ColorHsv.RED, ..., constants are defined in the ranges 0-360 
> (for hue) and 0-100 (for brightness & value).
>  
> However methods in ColorConversions expect ranges 0-1 everywhere.
>  
> Documentation should be clearer and the API consistent.
>  
> The following assertions are in failure:
> assertEquals(Color.BLUE, new 
> Color((ColorConversions.convertHSVtoRGB(ColorHsv.BLUE))));
> assertEquals(ColorHsv.BLUE, 
> ColorConversions.convertRGBtoHSV(Color.BLUE.getRGB()));
>  
> The following assertions are OK:
>  assertEquals(Color.BLUE, new 
> Color((ColorConversions.convertHSVtoRGB(ColorHsv.BLUE.H / 360.0,
>  ColorHsv.BLUE.S / 100.0, ColorHsv.BLUE.V / 100.0))));
> assertEquals(new ColorHsv(ColorHsv.BLUE.H / 360.0, ColorHsv.BLUE.S / 100.0, 
> ColorHsv.BLUE.V / 100.0), 
> ColorConversions.convertRGBtoHSV(Color.BLUE.getRGB()));



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to