How to Write a Colour swatch into code of a script?

Screenshot 2023-07-04 142112
Sorry for the low quality but, I’m new to unity and saw this in a video and I’m wondering how you write a colour swatch into a script I’ve looked around and can’t find anything similar. ontop of that how would any of this be written I really have no clue please Help.

To create a color field in your script you can use Color or Color32 type:

// Color field, RGBA value - set color to green, with white alpha color
[SerializeField] Color myColor = new Color(0f, 1f, 0f, 1f);

Result is this in the Inspector:
image