การเลือกสี ตาม Material Design

จากโจทย์ เลย การเลือกสีอย่างไร ? ให้สวย ดูดี และ เข้ากัน สี เราจะแบ่งเป็น

colorPrimary

colorPrimaryDary

colorPrimaryLight

textColorPrimary

และ จะเลือกอย่างไร ? ไปที่ color.xml ที่อยู่ใน res/values

ต่อไปเราจะไปที่ http://design.google.com/spec

มาสเตอร์ ใช้บริการที่นี่บ่อยครับ ไปที่ แฮมเบอร์เกอร์เมนู ที่ ซ้ายบน

เลือก Color

ลงมาด้านล่าง

เลือกโทนสีที่อยากได้

colorPrimary มาสเตอร์ จะเลือกที่ 500

และ colorPrimaryDark จะเลือกที่ 700

นำไปกำหนดที่ colors.xml ได้เลย อีกแบบ

ให้คุณไปที่ https://material.io

ลงมาจนเห็น Color Tool

เลือก โทนสีที่อยากได้

เอาไปกำหนดที่ colors.xml

ลองทดสอบโค้ด ก็เรียบร้อยโรงเรียนมาสเตอร์ แบบนี่

มาสเตอร์ อึ่ง

จงอย่าคิดที่จะเดิน จงเดินเลย

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade