เก็บสี อ่านสีจากหน้าจอ หรือเปรียบเทียบสี ARGB ประกอบด้วยความทึบ (A), แดง (R), เขียว (G) และน้ำเงิน (B); compare(), distance_rgb() และ delta_e() ไม่ใช้ค่าความทึบ
รูปแบบคำสั่ง
Color(value, /)พารามิเตอร์สำหรับสร้างออบเจ็กต์
| ชื่อ | คำอธิบาย |
|---|---|
valueString | Number | Hex string (`#AARRGGBB`/`#RRGGBB`) or raw ARGB number. จำเป็น · ระบุตามตำแหน่งเท่านั้น ไม่มีค่าเริ่มต้น |
ค่าที่ส่งกลับ
ตัวอย่าง
cursor = Point(540, 920)
picked = Color.get(cursor)
if picked == "#FFFFFFFF":
click(cursor, random=6)ฟิลด์
| ชื่อ | คำอธิบาย |
|---|---|
argbNumber | Raw ARGB integer value. |
aInt | ความทึบตั้งแต่ 0 (โปร่งใส) ถึง 255 (ทึบทั้งหมด) |
rInt | Red channel 0-255. |
gInt | Green channel 0-255. |
bInt | Blue channel 0-255. |
hexString | Hex string `#AARRGGBB`. |
c1 = Color("#FFFFFFFF")
c2 = Color(4294967295)