Every line of 'tkinter border color' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
19 def bordercolors(root, colorName): 20 lightRGB = [] 21 darkRGB = [] 22 for value in Pmw.Color.name2rgb(root, colorName, 1): 23 value40pc = (14 * value) // 10 24 if value40pc > int(Pmw.Color._MAX_RGB): 25 value40pc = int(Pmw.Color._MAX_RGB) 26 valueHalfWhite = (int(Pmw.Color._MAX_RGB) + value) // 2; 27 lightRGB.append(max(value40pc, valueHalfWhite)) 28 29 darkValue = (60 * value) // 100 30 darkRGB.append(darkValue) 31 32 return ( 33 '#%04x%04x%04x' % (lightRGB[0], lightRGB[1], lightRGB[2]), 34 '#%04x%04x%04x' % (darkRGB[0], darkRGB[1], darkRGB[2]) 35 )