Hi, Alex here from rebeloper.com and welcome back to the channel and welcome back to
this awesome tutorial series about DuckUI. Now what is DuckUI?
It is SwiftUI in UIKit, well kind of. So stay tuned to find out more because we are
going to start diving deep into styling and we are going to start with colors.
So let's jump right into the code.
Okay! Now in the previous episode we have
talked about scroll views. So let me just uncomment this line and these lines so I
can use this simple view on a scroll view, yeah it doesn't really matter for
now go ahead and take a look at the previous episode of this theme where I
discuss scrolling but it basically does is add a simple view and we are kind of
covering our blue. So Xcode 11 light blue color. Now if we go ahead and let me just open
up DuckUI here so I can show you where that link actually is so let's hit
alt here or rather yet command and it will open up and the browser. So if you
take a look at this documentation it is basically the human interface guidelines
visual design / color. Now you can see that there are new system colors in
Xcode 11 and they are default and accessible. Just scroll down, take a look
at them they are quite a few and here we have a default and accessible gray
colors. They are basically used in UI elements all across SwiftUI. Now of
course these are system colors and they have other properties
than just there color they adapt and so on so yeah you shouldn't replace the
system colors in Xcode 11 with this one but since we are not just yet there
we are still using Xcode 10. We could just use DuckUIs DColor. So we can
reference these colors and when you are on Xcode 11 maybe you are when you are
watching this tutorial maybe you will want to go back to Xcode 10s
colors and DColor has that covered for you too. So let's see here
let's go back here let me minimize DuckUI and here we have some blue and what
it does let me just build it one this end let's just take a look at how Xcode 11s
light blue is. So let's just wait, yeah, yes that is it but let me just show
you how Xcode 10s blue is. Xcode 10 dot blue, there we go. Let's hit command R and
yeah you can see the differences where basically this is a harsh old blue.
I never really liked this but these new kind of Blues I can see in the status
bar and down below they are quite, quite good-looking. Now of course because I am
working on Xcode 10. We could just simply replace all of these with dot
blue because set background color needs a UIColor and dot blue is the system
color. Yep! So we could use that if we wanted to we have the same outcome but
let's just go back here and let's just use Xcode 11 light blue. Now what else do
we have? Well let's just just start typing out.
So Xcode 10. Let me just clear that, black blue and so on clear gray magenta yeah that
is just a standard. You already know but with Xcode 11 we have dark light and
accessible. Now accessible is for accessibility again you, you are just
using DuckUI colors because you just want to have them as colors.
They don't have that those features that Xcode 11, basically not
Xcode 11 SwiftUI has with the system colors, okay. So let's just take a look at
the light and here we have blue gray, six types of gray's. Green and indigo, orange,
pink, purple, red, teal and yellow. There are quite a few new ones and there they
are missing some old ones but basically that's it. Dark basically they are the
same but with dark nuances. So you could use that to build out or right here just
test because basically what you should do here is just test your own code like
background colors or just have some basic colors and there. So yeah we have
the same colors here. Now accessible if you have inaccessible we have again a
dark or light and the same colors. Go ahead and let me just select dark and
maybe yeah let me just show you yellow because it's in quite interesting if we
have an accessible believe dark yellow. Let's see what do we have here because
it's kind of brownish I don't really know why that is but there's most
probably a good reason to do that and not the dark but light because yeah you
saw that it is kind of yellow but on light it's kind of brown. So yeah there
must be a reason. Go ahead comment down below if you do know why this is kind of
brownish but go ahead and take a look yeah let's just see, there we go.
Here we have our light yellow, system yellow color here. Maybe, maybe you know
why this is, okay. Now that is it for this tutorial it's kind of basic but these
colors look so fantastic. Let's just show you they are awesome and now you can use
them in your let's say three SwiftUI projects too. So yeah that's a
good advantage for colors in DuckUI. I hope you enjoyed this video if you did
go ahead and give it a thumbs up, subscribe to the channel and hit that
notification bell because if you don't well maybe you will miss out on some of
the videos that I post our daily. So as usual I will see you in the next one.