1

I was making a Gauroud algorithm and when i had calculated point intensity on the edge I didn't know what to do with it. I tried to decide this problem like:

    private int getPointRGB(double intensity)
    {
        float[] hsb=null;
        double newCrRed;
        double newCrGr;
        double newCrBlue;
        int nRGB;
//crRed, crGr, crBlue - primary components of edge RGB
        newCrRed = intensity*crRed;
        newCrGr = intensity*crGr;
        newCrBlue = intensity*crBlue;
        hsb = Color.RGBtoHSB((int)newCrRed, (int)newCrGr, (int)newCrBlue, null);
        nRGB = Color.HSBtoRGB(hsb[0], hsb[1], hsb[2]);
     return(nRGB);
    }

am I right?

ilya8891
  • 127
  • 1
  • 1
  • 12
  • 2
    What do these mean: "RGB in polygon point", "intensity", "primary RGB"? – Ted Hopp Jun 24 '11 at 15:45
  • 2
    Having a hard time understanding this question. Can you elaborate a bit? Maybe provide details about the code you have and how it's not working.... – joeslice Jun 24 '11 at 15:45
  • 2
    My guess is that it's about a color picker with the RGB color in a 3 axis polygon plus a separate intensity selector. – Kwebble Jun 24 '11 at 16:02

1 Answers1

1

If none of the default color choosers are satisfactory, you can create your own custom chooser panel, as discussed in How to Use Color Choosers: Creating a Custom Chooser Panel. For example, you could implement the CIE 1976 color space, shown here.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045