# Sockets

## Socket Colors and Types <a href="#socket-colors-and-types" id="socket-colors-and-types"></a>

AugeLab Studio provides different colors in sockets to indicate what kind of data is transferred through a socket. These colors show which class or data type the input/output belongs to. Read the descriptions below to learn which colors are associated with which data types.

{% hint style="info" %}
For more additional information on socket data types, refer to [Coding Reference](../key-features/create-plugins-with-designer-window/coding-reference).
{% endhint %}

<details>

<summary>Light Green (Any Image)</summary>

This socket color corresponds to a mixed image data type and only image data should be connected.

**Camera USB** block below has one green output socket and outputs a colored image it received from the camera.

Light Green sockets output BGR and GRAY format data.

<img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-6255bbc78b3e6b8f03dfff4afe0d7c4e7d8be891%2FEkran%20g%C3%B6r%C3%BCnt%C3%BCs%C3%BC%202023-06-30%20000120.png?alt=media" alt="" data-size="original">

</details>

<details>

<summary>Purple (Gray Image)</summary>

Purple sockets correspond to grayscale image type. Color image data cannot be connected to this socket.

Purple sockets output grayscale, single-channel image data. This data type may not be used by Light Green sockets. To convert it, use [**Color Space**](blocks-reference/image-transformations/transformation-filters/color-space) function block.

<img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-e451b87e7d525f1af79b7cab06836eb0127bddc5%2FEkran%20g%C3%B6r%C3%BCnt%C3%BCs%C3%BC%202023-06-29%20235854.png?alt=media" alt="" data-size="original">

</details>

<details>

<summary>Blue (Colored Image)</summary>

Blue-colored sockets correspond to colored image data types. These guarantee a colored image output, unlike [Light Green](../block-structures#light-green) sockets.

Colored Image consists of 3 different arrays, Blue-Green-Red. These also can be split with [Split ](blocks-reference/image-transformations/operations/split-image)[Image](blocks-reference/image-transformations/operations/split-image) block.

<img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-47982d5b0c6a99946630d47381fd0c68d41b3162%2Fimage.png?alt=media" alt="" data-size="original">

</details>

<details>

<summary>Light Blue (Boolean)</summary>

Lift Blue colored sockets correspond to logic data types, which are either **True** or **False**.

For example, the camera block above has blue input sockets and only takes True or False values.

Logic expressions consist of only two states; **True** and **False**.

<img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-4fa00a728f8b855e94907b36928cb386aaf0603c%2Fimage.png?alt=media" alt="" data-size="original">

</details>

<details>

<summary>Yellow (Number)</summary>

Yellow sockets correspond to integer data type. The following function block has yellow sockets and takes only integer values.

Integer basically means whole numbers.

<img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-0ac171662412c05bd29bd648c1ed59d162055324%2FEkran%20g%C3%B6r%C3%BCnt%C3%BCs%C3%BC%202023-06-30%20001502.png?alt=media" alt="" data-size="original">

</details>

<details>

<summary>Purple (Position)</summary>

Pink sockets output as position/point data type. For example ((x1,y1),(x2,y2)) you can get the position of any object.

Point data type consists of two numbers, first is the horizontal position and the second is the vertical position.

<img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-37ca21d7ddbd78f538ca79da3f1d0daf9b0c0ec0%2Fimage.png?alt=media" alt="" data-size="original">

</details>

<details>

<summary>Orange (Shape)</summary>

Orange sockets correspond to the shape data type.

Shape data type consists of multiple points, which also consist of two numbers representing where they reside in two-dimensional space.

<img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-71e5b0df10b71e50ae0b067ed4b201a1312a2f54%2Fimage.png?alt=media" alt="" data-size="original">

</details>

<details>

<summary>Dark Green (Undefined)</summary>

Green sockets are sockets corresponding to undefined data types. These color sockets can contain any variant type and can be connected with other sockets.

Be careful when working with green type sockets and make sure data flow is safe.

</details>

<details>

<summary>Gray (Text)</summary>

The gray sockets correspond to the text data type.

Texts are strings and can be modified to represent results.

<img src="https://63608322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbH8gla5D8g5pQAK8IzR8%2Fuploads%2Fgit-blob-989cf416e78a048a474be623a55254896fb0ee7c%2FEkran%20g%C3%B6r%C3%BCnt%C3%BCs%C3%BC%202023-06-30%20002425.png?alt=media" alt="" data-size="original">

</details>
