1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: ~500 more byte=>u8

This commit is contained in:
Alexander Medvednikov
2022-04-15 18:25:45 +03:00
parent ae6a25f44e
commit fbb9e65c0f
148 changed files with 544 additions and 494 deletions

View File

@@ -116,10 +116,10 @@ pub const (
// Color represents a 32 bit color value in sRGB format
pub struct Color {
pub mut:
r byte
g byte
b byte
a byte = 255
r u8
g u8
b u8
a u8 = 255
}
// hex takes in a 32 bit integer and splits it into 4 byte values
@@ -132,7 +132,7 @@ pub fn hex(color int) Color {
}
}
pub fn rgb(r byte, g byte, b byte) Color {
pub fn rgb(r u8, g u8, b u8) Color {
return Color{
r: r
g: g
@@ -140,7 +140,7 @@ pub fn rgb(r byte, g byte, b byte) Color {
}
}
pub fn rgba(r byte, g byte, b byte, a byte) Color {
pub fn rgba(r u8, g u8, b u8, a u8) Color {
return Color{
r: r
g: g