#AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7 #AutoIt3Wrapper_Run_Tidy=y #include Local $bDark = False, $bLight = False ; --------------------------------------------------------------------------------------- Local $hGUI = GUICreate("SciTE Theme", 575, 300) GUISetFont(64, 900, Default, "Impact", $hGUI, 5) Local $idLight = GUICtrlCreateButton("Light", 25, 25, 250, 250) Local $idDark = GUICtrlCreateButton("Dark", 300, 25, 250, 250) GUISetState() ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; main loop ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - While True Switch GUIGetMsg() Case -3 Exit 0 Case $idLight $bLight = True ExitLoop Case $idDark $bDark = True ExitLoop EndSwitch WEnd ; --------------------------------------------------------------------------------------- Local $iBgColor = 0, $iFgColor = 0, $iLimInf = 0, $iLimSup = 0 Local $iColor = "", $sText = "" ; 35 +-15 If $bLight Then $iLimInf = 20 $iLimSup = 50 $iBgColor = "#FFFFFF" EndIf ; 80 +-15 If $bDark Then $iLimInf = 65 $iLimSup = 95 $iBgColor = gen_color(2, 8) EndIf ; --------------------------------------------------------------------------------------- $sText &= "font.monospace=font:Consolas,size:11.5" & @CRLF $sText &= "#" & @CRLF $sText &= "# https://github.com/IBM/plex/releases ( TrueType.zip )" & @CRLF $sText &= "# install 'IBM Plex Mono' Font " & @CRLF $sText &= "font.monospace=font:IBM Plex Mono,weight:500,size:11.5 " & @CRLF & @CRLF $sText &= "font.base=$(font.monospace)" & @CRLF & @CRLF $sText &= "technology=3" & @CRLF $sText &= "code.page=65001" & @CRLF $sText &= "toolbar.visible=0" & @CRLF $sText &= "statusbar.visible=1" & @CRLF $sText &= "line.margin.visible=1" & @CRLF & @CRLF $sText &= "split.vertical=0" & @CRLF $sText &= "output.vertical.size=280" & @CRLF $sText &= "output.initial.hide=0" & @CRLF & @CRLF $sText &= "highlight.current.word=1" & @CRLF $sText &= "highlight.current.word.colour=#808080" & @CRLF $sText &= "highlight.current.word.indicator=style:roundbox," & _ "colour:#0080FF,under,outlinealpha:140,fillalpha:20 " & @CRLF & @CRLF $sText &= "selection.layer=1" & @CRLF $sText &= "selection.back=" & gen_color(60, 70) & @CRLF & @CRLF $sText &= "caret.line.back.alpha=20" & @CRLF If $bLight Then $sText &= "caret.fore=#000000" & @CRLF $sText &= "caret.line.back=#000000" & @CRLF & @CRLF $sText &= "selection.fore=#000000" & @CRLF & @CRLF $sText &= "fold.margin.colour=#FFFFFF" & @CRLF $sText &= "fold.margin.highlight.colour=#FFFFFF" & @CRLF $sText &= "fold.back=#FFFFFF" & @CRLF EndIf If $bDark Then $sText &= "caret.fore=#FFFFFF" & @CRLF $sText &= "caret.line.back=#FFFFFF" & @CRLF & @CRLF $sText &= "selection.fore=#FFFFFF" & @CRLF & @CRLF $sText &= "fold.margin.colour=" & $iBgColor & @CRLF $sText &= "fold.margin.highlight.colour=" & $iBgColor & @CRLF $sText &= "fold.back=#000000" & @CRLF EndIf $sText &= "fold.margin.width=40" & @CRLF $sText &= "fold.symbols=2" & @CRLF $sText &= "fold.fore=#808080" & @CRLF $sText &= "fold.highlight.colour=#FF00FF" & @CRLF & @CRLF $sText &= "edge.mode=1" & @CRLF $sText &= "edge.column=90" & @CRLF $sText &= "edge.colour=#DDEEFF" & @CRLF & @CRLF $sText &= "position.maximize=1" & @CRLF $sText &= "save.session=1" & @CRLF $sText &= "save.recent=1" & @CRLF $sText &= "save.position=1" & @CRLF & @CRLF $sText &= @CRLF ; --------------------------------------------------------------------------------------- For $c = 0 To 38 $iColor = "=fore:" & gen_color($iLimInf, $iLimSup) ;--- If $c = 32 Then If $bLight Then $iColor = "=fore:#000000,back:" & $iBgColor & ",$(font.monospace)" If $bDark Then $iColor = "=fore:#FFFFFF,back:" & $iBgColor & ",$(font.monospace)" EndIf ;--- If $c = 33 Then If $bLight Then $iColor = "=fore:#808080,back:#F4F4F4" If $bDark Then $iColor = "=fore:#808080,back:" & $iBgColor EndIf ;--- $sText &= "style.au3." & $c & $iColor & @CRLF If $c = 16 Then $c = 31 Next $sText &= @CRLF $sText &= "style.errorlist.0=$(style.au3.0)" & @CRLF $sText &= "style.errorlist.3=$(style.au3.3)" & @CRLF $sText &= "style.errorlist.4=$(style.au3.4)" & @CRLF $sText &= "style.errorlist.10=$(style.au3.10),bold" & @CRLF $sText &= "style.errorlist.11=$(style.au3.11)" & @CRLF $sText &= "style.errorlist.12=$(style.au3.12),bold" & @CRLF $sText &= "style.errorlist.13=$(style.au3.13)" & @CRLF $sText &= "style.errorlist.32=$(style.au3.32),size:10,back:" & $iBgColor & @CRLF & @CRLF $sText &= "lexer.$(file.patterns.props)=props" & @CRLF $sText &= "file.patterns.props=*.properties;*.ini;*.inf;*.reg;*.url;*.cfg;*.cnf;*.aut" & @CRLF $sText &= "style.props.0=$(style.au3.0)" & @CRLF $sText &= "style.props.1=$(style.au3.1)" & @CRLF $sText &= "style.props.5=$(style.au3.5)" & @CRLF $sText &= "style.props.32=$(style.au3.32)" & @CRLF $sText &= "style.props.33=$(style.au3.33)" & @CRLF ; --------------------------------------------------------------------------------------- ;ConsoleWrite($sText & @CRLF) ;ConsoleWrite("bgcolor:" & $iBgColor & @CRLF) ClipPut($sText) ConsoleWrite(@CRLF & $sText & @CRLF) ; --------------------------------------------------------------------------------------- ; colors :: luminosity 0(dark) 100(bright) ; --------------------------------------------------------------------------------------- Func gen_color($iLimInf, $iLimSup) Local $sColor = "0x000000" Local $iR = 0, $iG = 0, $iB = 0 Local $fLuminosity = 0.0 Do $sColor = "0x" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) $iR = Dec(StringMid($sColor, 3, 2)) / 255 * 100 $iG = Dec(StringMid($sColor, 5, 2)) / 255 * 100 $iB = Dec(StringMid($sColor, 7, 2)) / 255 * 100 $fLuminosity = (Sqrt(0.299 * ($iR ^ 2) + 0.587 * ($iG ^ 2) + 0.114 * ($iB ^ 2))) Until $fLuminosity < $iLimSup And $fLuminosity > $iLimInf ;ConsoleWrite("Lum:" & Round($fLuminosity, 0) & " R:" & Round($iR, 1) & " G:" & Round($iG, 1) & " B:" & Round($iB, 1) & " hex:" & $sColor & @CRLF) $sColor = StringReplace($sColor, "0x", "#") Return $sColor EndFunc ;==>gen_color