# SkinDefinitionText class

Namespace: [Grasshopper2.UI.Skinning](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.skinning.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public static class SkinDefinitionText
```

The text form of a skin definition. One property per line:

```cs
// comment
Lit.Shades.Apex.Normal = #E2E2E2
Lit.Shades.Slab.Normal = Lit.Shades.Apex.Normal | Luminance -20%
Lit.Shape.Corners      = 3
Lit.Icons.Filter       = Saturation -70% | Mix Lit.Canvas.Paper 10%
Lit.Wires.Dash.Null    = 4 1
```

 Colour literals use CSS notation: hex, oklch(), oklab() or rgb(), with an optional alpha after a slash. A filter is a bare stack of colour modifiers, or None. A dash pattern is dash and gap lengths in multiples of the wire width, or Solid. Everything else is this format's own.

## Fields

- [NoFilter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/nofilter.md): (static) The word an empty filter is written as.
- [SolidDash](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/soliddash.md): (static) The word a solid stroke is written as.

## Methods

- [Parse](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/parse.md): (static) Parse definition text into an existing definition. Lines that cannot be read are reported and skipped; the rest are applied.
- [TryParseBinding](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/tryparsebinding.md): (static)
- [TryParseColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/tryparsecolour.md): (static) Parse a colour literal in CSS notation: #RGB, #RRGGBB, #RRGGBBAA, oklch(L C H), oklab(L a b) or rgb(r g b), each optionally followed by "/ alpha" where alpha is a fraction or a percentage.
- [TryParseDash](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/tryparsedash.md): (static) Parse a dash pattern: lengths separated by spaces or commas, or [SkinDefinitionText.SolidDash](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/soliddash.md).
- [TryParseFilter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/tryparsefilter.md): (static) Parse a filter: colour modifiers separated by pipes, or [SkinDefinitionText.NoFilter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/nofilter.md).
- [Write](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/write.md): (static)
- [WriteColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/writecolour.md): (static) Write a colour literal. Colours defined in Oklab become oklch(); everything else becomes hex, rounded to the 8-bit grid. rgb() is still read, never written.
- [WriteDash](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/writedash.md): (static) Write a dash pattern as its lengths separated by spaces, or [SkinDefinitionText.SolidDash](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/soliddash.md) when there are none.
- [WriteFilter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/writefilter.md): (static) Write a filter as its modifiers separated by pipes, or [SkinDefinitionText.NoFilter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/nofilter.md) when there are none.
- [WriteLength](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.skinning.skindefinitiontext/writelength.md): (static)
