11# ColorButton.ahk
22An extended method for changing a button's background color.
33
4+ [ English] ( #colorbuttonahk ) | [ 中文] ( #colorbuttonahk-1 ) | [ Srpski] ( #colorbuttonahk-2 )
5+
6+
47## Features
58- Easily change a button's background color.
9+ - Automatically set the text colour to white or black depends on the background colour.
610- Compatible with [ AutoHotkey v2.1-alpha.9] ( https://github.com/AutoHotkey/AutoHotkeyDocs/tree/alpha ) or later.
711- Learn more about the ahk v2.1-alpha: [ Click here] ( https://github.com/AutoHotkey/AutoHotkeyDocs/tree/alpha )
812
@@ -14,11 +18,10 @@ An extended method for changing a button's background color.
1418![ colorButton_win10_demo] ( https://github.com/nperovic/ColorButton.ahk/assets/122501303/63c20602-b45d-4030-93a9-0a258c70acb4 )
1519
1620
17-
1821## Usage
19221 . Download the [ ColorButton.ahk] ( ColorButton.ahk ) file.
20232 . Include the [ ColorButton.ahk] ( ColorButton.ahk ) file in your script.
21- 3 . Implement dark theme by using the ` SetBackColor ` method.
24+ 3 . Implement the background color by using the ` SetBackColor ` method.
2225
2326## Example
2427``` py
@@ -36,3 +39,79 @@ myGui.Show("w300 h300")
3639## License
3740This project is licensed under the MIT License - see the [ LICENSE.md] ( LICENSE.md ) file for details.
3841
42+ ---
43+
44+ # ColorButton.ahk
45+ 本程式庫為內建類別 ` Gui.Button ` 擴充了一個更改按鈕背景顏色的方法。
46+
47+ ## 特點
48+ - 輕鬆更改按鈕的背景顏色。
49+ - 自動根據背景色彩的深淺設定文字色彩 (深色背景+白色文字或淺色背景+黑色文字)。
50+ - 支援 AutoHotkey v2.1-alpha.9 或更高版本。
51+ - 想知道更多關於 [ ahk v2.1-alpha] ( https://github.com/AutoHotkey/AutoHotkeyDocs/tree/alpha ) 的資訊,請按[ 這裡] ( https://github.com/AutoHotkey/AutoHotkeyDocs/tree/alpha ) 。
52+
53+ ** 在 Windows 11 上**
54+ ![ colorButton_win11_demo] ( https://github.com/nperovic/ColorButton.ahk/assets/122501303/567a8145-c7c3-4800-9210-613b3bdc2f71 )
55+
56+ ** 在 Windows 10 上**
57+ ![ colorButton_win10_demo] ( https://github.com/nperovic/ColorButton.ahk/assets/122501303/63c20602-b45d-4030-93a9-0a258c70acb4 )
58+
59+ ## 用法
60+ 1 . 下載 [ ColorButton.ahk] ( ColorButton.ahk ) 文件。
61+ 2 . 在您的程式碼中加入 [ ColorButton.ahk] ( ColorButton.ahk ) 。
62+ 3 . 使用 ` SetBackColor ` 方法變更按鈕背景色彩。
63+
64+ ## 範例
65+ ``` py
66+ # requires AutoHotkey v2.1-alpha.9
67+ # include <ColorButton>
68+
69+ myGui := Gui()
70+ myGui.SetFont(" cWhite s24" , " Segoe UI" )
71+ myGui.BackColor := 0x 2c2c2c
72+ btn := myGui.AddButton(, " SUPREME" )
73+ btn.SetBackColor(0x aa2031 )
74+ myGui.Show(" w300 h300" )
75+ ```
76+
77+ ## 許可證
78+ 本項目根據 MIT 許可證進行許可 - 請參閱 [ LICENSE.md] ( LICENSE.md ) 文件以獲取詳細資訊。
79+
80+ ---
81+
82+ # ColorButton.ahk
83+ Proširena metoda za promenu boje pozadine dugmeta.
84+
85+ ## Karakteristike
86+ - Lako promenite boju pozadine dugmeta.
87+ - Kompatibilno sa AutoHotkey [ v2.1-alpha.9] ( https://github.com/AutoHotkey/AutoHotkeyDocs/tree/alpha ) ili novijim verzijama.
88+ - Saznajte više o ahk v2.1-alpha: [ Kliknite ovde] ( https://github.com/AutoHotkey/AutoHotkeyDocs/tree/alpha )
89+
90+ ## Demo
91+ ** Na Windows 11**
92+ ![ colorButton_win11_demo] ( https://github.com/nperovic/ColorButton.ahk/assets/122501303/567a8145-c7c3-4800-9210-613b3bdc2f71 )
93+
94+ ** Na Windows 10**
95+ ![ colorButton_win10_demo] ( https://github.com/nperovic/ColorButton.ahk/assets/122501303/63c20602-b45d-4030-93a9-0a258c70acb4 )
96+
97+
98+ ## Upotreba
99+ 1 . Preuzmite ColorButton.ahk datoteku.
100+ 2 . Uključite ColorButton.ahk datoteku u vaš skript.
101+ 3 . Implementirajte boju pozadine koristeći ` SetBackColor ` metodu.
102+
103+ ## Primer
104+ ``` py
105+ # requires AutoHotkey v2.1-alpha.9
106+ # include <ColorButton>
107+
108+ myGui := Gui()
109+ myGui.SetFont(" cWhite s24" , " Segoe UI" )
110+ myGui.BackColor := 0x 2c2c2c
111+ btn := myGui.AddButton(, " SUPREME" )
112+ btn.SetBackColor(0x aa2031 )
113+ myGui.Show(" w300 h300" )
114+ ```
115+
116+ ## Licenca
117+ Ovaj projekat je licenciran pod MIT Licencom - za detalje pogledajte [ LICENSE.md] ( LICENSE.md ) datoteku.
0 commit comments