# Styles

Rayon is also about **applying a professional rendering to your drawings** : applying colors, line weights, fonts, text sizes, using hatches and textures, etc.

**All this** can be controlled in Rayon **using** **styles**, located in the property panel.

<figure><img src="/files/gYWVgBeutZxWqMXLZqke" alt=""><figcaption></figcaption></figure>

### The basics of styles <a href="#h_c0d5ad3f27" id="h_c0d5ad3f27"></a>

In Rayon, **styles document the aspect of all elements** (a text box, a line, a surface, etc.).&#x20;

#### Style types

Styles come in 4 different types; **shape** style, **text** style, **annotation** style and **wall** style. We detail below how each style type works...

{% tabs %}
{% tab title="Shape style" %}
**Shape styles** offer the following options:

* Fill (type, opacity, etc)
* Stroke (tickness, color, dashing, etc)

<figure><img src="/files/RGfIUaYM7bBDxP1CLI4L" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Text style" %}
**Text styles** offer the following options:

* Text color and size (type, opacity, etc), and text options (units, unit formatting, etc)
* Font family
* Font style (bold, italic, etc)

<figure><img src="/files/5Vx8ziJtz1oLbuZyMiqa" alt=""><figcaption></figcaption></figure>

**Text options** allow you to further customoze your text's content, with the following options...
{% endtab %}

{% tab title="Annotation style" %}
**Annotation styles** offer the following options:

* Text color and size (type, opacity, etc), and text options (units, unit formatting, etc)
* Font family
* Font style (bold, italic, etc)
* Stroke (tickness, color, dashing, etc)
* Extension lines option (tickness, color, dashing, etc)
* Ends styling (arow head, dot, etc) and size
* Head options (block vs text)

<figure><img src="/files/3EtUw98MEAOiOTUIdPPb" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Wall style" %}
**Wall styles** offer the following options:

* Wall thickness
* Fill (type, opacity, etc)
* Stroke (tickness, color, dashing, etc)

<figure><img src="/files/T8Cnw0o7k36RnZry0DHm" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

#### Fill types <a href="#h_aeea2b7ec7" id="h_aeea2b7ec7"></a>

In shape and wall styles, the **fill option** can be of different kinds: **solid**, **gradient**, **texture**, **hatch**, and **image**. We detail below how each one works.

{% tabs %}
{% tab title="Solid" %}
Fills can use a **`solid`** fill. \
A solid fill is made of single color, and opacity.

<figure><img src="/files/YTD163MBNCJgOaLlailg" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Gradients" %}
Fills can use a **`gradient`**. \
Gradients can be **`Linear`**, **`Angular`** or **`Radial`**.

<figure><img src="/files/l8kWY0JQQF1ohC8IIm0F" alt=""><figcaption></figcaption></figure>

For any of those options, controls will be accessible on the canvas to define the position and extents of the gradient. **`Start`** and **`End`** value will allow you to assign a given color to each part of the gradient.
{% endtab %}

{% tab title="Texture & hatches" %}
Fills can use a **`Texture`** or a **`Hatch`**. \
Both types of fill allow **choosing a pattern**. If patterns offered in Rayon's libraries are not what you need, **uploading** a seamless texture or a PAT hatch file is also possible.

<figure><img src="/files/8y41LuJW4JQOifuXfwgX" alt=""><figcaption></figcaption></figure>

For entities carrying a fill using a **hatch** or a **texture**, **the pattern of each element can be edited independently!** To do so, head to the **`Tiling`** field, to enable the option.&#x20;

{% embed url="<https://player.vimeo.com/video/1132144233?autoplay=1&controls=0&loop=1&muted=1>" %}

You can then manually **use the blue dot to rotate and offset** the pattern, or **simply input precise offset/rotation values** in the tiling panel.

<figure><img src="/files/SItQCI5l6R81rnZQiH8j" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### Editing, saving & sharing styles

Styles can be either **specific** to a given entity, or **shared** across elements.

Styles can be **edited**, **published**, and **shared** across your drawings.

Let's dive in!

#### Editing a style <a href="#h_f70982897a" id="h_f70982897a"></a>

**Styles' settings** can be found **in the property panel**, on the right.\
Styles can be edited through their **different token fields** (Fill, Stroke, etc), or **swapped**/**saved** through the options of the section header.

<figure><img src="/files/p7FVmlD8Foe0h9Gk9kov" alt=""><figcaption></figcaption></figure>

#### Saved styles

At any point, **the style of an element can be saved**, in order to apply it to multiple elements at once. Clicking on **`+`** allows saving styles.

{% embed url="<https://player.vimeo.com/video/1028233608?autoplay=1&controls=0&loop=1&muted=1>" %}

Once saved, a style displays different options...

* Editing
* Swapping
* Detaching

... accessible on and above the style itself.

<figure><img src="/files/yXa59gnsFWHiQErQ4DkB" alt=""><figcaption></figcaption></figure>

**Editing** a saved style allows changing that style across all shapes carrying it. \
That way, an entire drawing can be redesigned **by simply intervening on the few saved styles** carried by the drawing's elements.

{% embed url="<https://player.vimeo.com/video/1028233622?autoplay=1&controls=0&loop=1&muted=1>" %}

**Swapping** allows replacing a saved style by another. \
That action can be triggered by using the **quad button**, or by **clicking on the style itself.**

{% embed url="<https://player.vimeo.com/video/1028233614?autoplay=1&controls=0&loop=1&muted=1>" %}

**Finally, detaching** allows removing a saved style for the current selection. Elements whose style has been detached will go back to having their own specific styling.

### Style libraries & publishing <a href="#h_aeea2b7ec7" id="h_aeea2b7ec7"></a>

At any point, you can **find all the styles contained in your drawing** in the left-side **style panel.**&#x20;

* **`In model styles`** lists all the styles you have in your model
* **`Libraries`** gives you access to extensive libraries

Styles listed under **`In model styles`** can be **curated**, using the panel's options; actions such as...

* **Creating** new styles by clicking on **`+`**
* **Editing/renaming** any given style
* **Deleting** unused styles

<figure><img src="/files/yXkzEQKUa21J54h596GF" alt=""><figcaption></figcaption></figure>

More importantly, this list can be **turned into a library**, by being published.

* Publishing can be found in the **`Share`** modal (upper right corner), under the **`Publish styles`** tab.
* A library can be **refreshed** at any time by hitting **`Refresh`** in the modal.
* Published libraries are accessible by users **within your organization.**

More [on libraries here](#h_aeea2b7ec7-1).

{% embed url="<https://player.vimeo.com/video/1028233586?autoplay=1&controls=0&loop=1&muted=1>" %}

### **The&#x20;*****active*****&#x20;style**

Each time a creation command gets used, the **active style appears in the property panel**; that style will be **assigned to the things you draw** with the current command.

{% embed url="<https://player.vimeo.com/video/1028233598?autoplay=1&controls=0&loop=1&muted=1>" %}

### Tutorial

For more step-by-step information, watch our tutorial about how to use styles in Rayon:

{% embed url="<https://www.youtube.com/watch?v=2hbZaSHVr64>" %}

***

### We are always available

Book a demo with our team, [right here](https://b1kzip68v9f.typeform.com/to/Hgr0eQ4k#source=docs).\
To get some support, reach out to us through our **in-app support chat**. \
More about [our support policy right here](/other-resources/others/support.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rayon.design/documentation/design/styles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
