# YxyDiagramGeometry class

Namespace: [Grasshopper2.UI.ColourPicker.Models](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.colourpicker.models.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class YxyDiagramGeometry
```

All the vector geometry part of a chromaticity diagram cached for a specific frame. Try re-using instances of this class if possible to avoid unnecessary overhead.

## Constructors

- [YxyDiagramGeometry](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/ctor.md): Create a new diagram.

## Properties

- [Frame](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/frame.md): Gets the frame this geometry is cached for.
- [GamutBlue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/gamutblue.md): Gets the blue corner of the sRGB gamut triangle.
- [GamutGreen](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/gamutgreen.md): Gets the green corner of the sRGB gamut triangle.
- [GamutRed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/gamutred.md): Gets the red corner of the sRGB gamut triangle.
- [Grid](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/grid.md): Gets the grid rectangle. It takes up 80% of the frame width and 90% of the frame height.
- [PlanckInfinity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/planckinfinity.md): Gets the end point of the Planckian locus.
- [PlanckThousand](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/planckthousand.md): Gets the start point of the Planckian locus.
- [YxyUnit](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/yxyunit.md): Gets the texture rectangle unit target rectangle. It exceeds the frame, but is used only to position Yxy vectorial unitised geometry within the grid.

## Methods

- [DrawDiagramFill](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/drawdiagramfill.md): Draw the Yxy diagram texture.
- [DrawGamutBoundary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/drawgamutboundary.md): Draw the sRGB gamut boundary.
- [DrawGamutExcession](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/drawgamutexcession.md): Draw the region outside the sRGB gamut.
- [DrawGrid](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/drawgrid.md): (2 overloads) Draw the Yxy grid lines.
- [DrawGridLabels](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/drawgridlabels.md): Draw the grid labels. Note that the labels exceed the Frame rectangle and are typically not included.
- [DrawPlanckianLocus](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/drawplanckianlocus.md): Draw the Planckian locus.
- [DrawPurpleShadow](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/drawpurpleshadow.md): Draw a drop shadow along the line of purples.
- [DrawSpectralLoci](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/drawspectralloci.md): Draw the spectral loci at ~5nm intervals.
- [DrawSpectralLocus](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/drawspectrallocus.md): Draw the spectral locus and the line of purples.
- [LimitChromaticityToGrid](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/limitchromaticitytogrid.md): (static) Limit a chromaticity coordinate to the interior of the grid, thus avoiding colours exceeding the chromaticity diagram.
- [LimitChromaticityToSpectrum](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.colourpicker.models.yxydiagramgeometry/limitchromaticitytospectrum.md): (static) Limit a chromaticity coordinate to the interior of the spectrum, thus avoiding a imaginary colours.
