We can modify how our string draws using what are called attributes.
So right now I have just the basic hello world example in.
It says Hello everyone.
So let's actually change how we draw this.
Hello everyone.
So to do that we're going to use attributes and to use attributes.
All you have to do is you have to say at Tron or ADT are in.
And then you can pick the attribute you want.
So I would say stand out in doubt.
OK.
And everything everything we draw after this line this this attribute on we'll use this standout attribute
to draw or run this.
See how it changed how it drew.
And now it's kind of has a black background with white text in the middle.
And we can change or we can do more attributes
say to you can you make it bold say
this.
Now it's it's hard probably hard to see but it's actually a little bit more it's a bit bigger.
It's all and you can actually show you all the attributes you can actually use here.
OK.
So you actually have quite a few different attributes you can use and all you actually play around with
it if you want but how you want to turn off attributes is through a t t r o f f.
So if I wanted to turn off stand out keep hold and maybe draw this in say maybe on
line
and try this.
So you see it's using the stand out and bold to draw the first one but just the bowl old to draw second.
So that's kind of how we can draw and modify our text using attributes.
And there's actually more attributes we can use here to get this
and those attributes are actually coloreds.
So how to draw colors is first we have to see if our council actually allows recolors So how we do that
is a if not not has colors.
So if we don't have colors unable for a con. we're going to exit out
this Riskin say hey consul doesn't it's for CH colour's do that
and all that and then we'll kind of just turns.
OK so if it gets to here then we know it does sparklers.
So how to start using colors is we call this starch color
colors always come in pairs.
So meaning there will be a color for the text and color for the background.
And you kind of set to set some color pairs.
We do this.
So in that pair and we'll say one and let's go hopefully something you can read and see color red and
put it on a black background color block
and this and so essentially what this will do is it'll set the first color pair.
So we get to choose what is to be red on black.
They even see the values.
Black is zero and red is one.
And then this just sets the actual color pair.
So you actually use the color pair we say Tron and then we'll see color.
Pair and then we give it the one we want.
So we're set one here so we're going to use one.
And if I run this
recolors sorry has cutlers.
You'll see it's a black background with in this case it's inverted text.
So the stand out makes it so that there's all kind of red red box around her text.
It says hello or one.
OK.
So if you want to play around with this little bit more let me show you the colors that curses gives
us here.
So we have black green yellow blue magenta cyan so play around with the different colors and the different
attributes and see kind of what you can make.
So in the next lecture I want to go over making a new utility library just for cursus.