Skip to content

Commit 376a82d

Browse files
author
David Accomazzo
committed
shit happened
2 parents 6ba0a8a + ed1a124 commit 376a82d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

colortest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ def getAllFgBgWithDiff(delta):
175175
getContrastParser = subparsers.add_parser('contrast', help='Print out a color test and get the contrast values')
176176
getContrastParser.add_argument('COLOR1', type=int, help='Must be between 0 and 256')
177177
getContrastParser.add_argument('COLOR2', type=int, help='Must be between 0 and 256')
178+
179+
printContrastParser = subparsers.add_parser('filterContrast', help='Print out all the combos that meet a given delta.')
180+
printContrastParser.add_argument('DELTA', type=int, help='Pick a color delta')
181+
182+
178183
args = parser.parse_args()
179184

180185
if args.command == 'dullFg':
@@ -200,5 +205,7 @@ def getAllFgBgWithDiff(delta):
200205
print(_getRGBDictFromANSICode(args.COLOR2))
201206
print(f'Difference between two colors is: {getContrast(args.COLOR1, args.COLOR2)}')
202207
testForegroundOnBackground(args.COLOR1, args.COLOR2)
208+
elif args.command == 'filterContrast':
209+
getAllFgBgWithDiff(args.DELTA)
203210
else:
204211
parser.print_help()

0 commit comments

Comments
 (0)