0.5 ? $diff / (2 - $max - $min) : $diff / ($max + $min); switch($max) { case $rgb[0]: $h = ($rgb[1] - $rgb[2]) / $diff + ($rgb[1] < $rgb[2] ? 6 : 0); break; case $rgb[1]: $h = ($rgb[2] - $rgb[0]) / $diff + 2; break; case $rgb[2]: $h = ($rgb[0] - $rgb[1]) / $diff + 4; break; } $h /= 6; } return array(360*$h, 100*$s, 100*$l); } //$link = "hsl("..", ".."%, ".."%)"; $color = hexToHsl($theme['lc']); $link = "hsl(".$color[0].", ".$color[1]."%, ".$color[2]."%)"; $color = hexToHsl($theme['tx']); $text = "hsl(".$color[0].", ".$color[1]."%, ".$color[2]."%)"; $color = hexToHsl($theme['bc']); $border = "hsl(".$color[0].", ".$color[1]."%, ".$color[2]."%)"; $color = hexToHsl($theme['bg']); $background = "hsl(".$color[0].", ".$color[1]."%, ".$color[2]."%)"; $backgroundDark = "hsl(".$color[0].", ". $color[1] ."%, ".($color[2] > 10 ? $color[2] - 10 : 0 )."%)"; $backgroundDarker = "hsl(".$color[0].", ". $color[1] ."%, ".($color[2] > 18 ? $color[2] - 18 : 0 )."%)"; $backgroundLight = "hsl(".$color[0].", ". $color[1] ."%, ".($color[2] < 90 ? $color[2] + 10 : 100 )."%)"; $backgroundLighter = "hsl(".$color[0].", ". $color[1] ."%, ".($color[2] < 70 ? $color[2] + 30 : 100 )."%)"; $backgroundL = $color[2]; $color = hexToHsl($theme['fg']); $foreground = "hsl(".$color[0].", ".$color[1]."%, ".$color[2]."%)"; $foregroundDark = "hsl(".$color[0].", ". $color[1] ."%, ".($color[2] > 10 ? $color[2] - 10 : 0 )."%)"; $foregroundDarker = "hsl(".$color[0].", ". $color[1] ."%, ".($color[2] > 18 ? $color[2] - 18 : 0 )."%)"; $foregroundLight = "hsl(".$color[0].", ". $color[1] ."%, ".($color[2] < 90 ? $color[2] + 10 : 100 )."%)"; $foregroundLighter = "hsl(".$color[0].", ". $color[1] ."%, ".($color[2] < 82 ? $color[2] + 18 : 100 )."%)"; $foregroundL = $color[2]; ?> p,div,span { color:; } a, .link { color: ; } textarea,input[type="text"],select{ background-color: ; color:; } body { background-color: ; } label { color: gray; } input[type="radio"]:checked+label { color: black; } input[type="checkbox"]:checked+label { color: red; } .topbar { background-color: ; } .gotop { background-color: rgba(255, 255, 255, 0.5); } .gotop a { color: ; } .topicon { color: ; } .toggleblur { background-color: ; color: ; } .tiselected { border-bottom: 2px solid ; } .alert { background-color: red; } #notifications { background-color:; box-shadow: 1px 1px 1px black; } .notif{ border-bottom:px solid #; background-color:; color: !important; } .notif .post_buttons{ background-color:; } .notif .text{ color: !important; } #quicksend,#send { background-color: ; color: ; border:0px; } .new { background-color:; } .side_element { background-color: #455f78; /*box-shadow: 1px 1px 1px black;*/ } .side_element li:hover,.menu li:hover { background-color: !important; } .side_element li:active { background-color: rgba(255, 255, 255, 0.25); } .uploadBox { box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1); } .delpic { color:red; background-color:white; } .formbtn { color:; } .formbtn label{ color:; } .profile,.loader { background-color:; color:; } .listmenu li { background-color:black; color:white; } .listmenu li:hover { background-color:white; color:black; } .autl:hover li{ background-color:lightgreen !important; } .rutl:hover li{ background-color:crimson !important; } .unblock,.unmute,.block,.mute,.follow, .unfollow, .nsfw, .unnsfw, .profileMenu, .listmenu { background-color: black; color: white; cursor: pointer; } .mute:hover,.block:hover,.follow:hover, .nsfw:hover { background-color: lime; } .unmute:hover,.unblock:hover,.unfollow:hover, .unnsfw:hover{ background-color: crimson !important; } .unbookmark{ color: crimson !important; } .unfav, .unreblog{ color: red !important; } .element_pad > .post { border-left:2px solid ; } .post, .rb, .textonly, .loadmore, .postform, .side_element, .searchmobile { border: px solid #; border-radius: px; background-color: ; /*box-shadow: 1px 1px 2px black;*/ } .menu,.menu li { background-color: !important; } .menu li:hover a { color: !important; } .menu li a { color: !important; } .menu { box-shadow: 1px 1px 2px black; } .previewpost,.userinfo { background-color: ; border: 1px solid ; box-shadow: 1px 1px 1px rgba(0,0,0,1); } .icon { background-color: black; } .post_footer { background-color: ; border-radius: 0px 0px px px; } .post_buttons { color: #404040; } .reply { background-color: ; border-bottom: 2px solid ; } .note { background-color: #ccc; } .button { background-color: white; } .setting label { background-color: lightgray; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1); } .setting input[type="radio"]:checked+label { background-color: ; ; box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); color: ; ; }