Skip to content

Commit ed1a124

Browse files
adding delta parser
1 parent 40043f9 commit ed1a124

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
@@ -165,6 +165,11 @@ def getAllFgBgWithDiff(delta):
165165
getContrastParser = subparsers.add_parser('contrast', help='Print out a color test and get the contrast values')
166166
getContrastParser.add_argument('COLOR1', type=int, help='Must be between 0 and 256')
167167
getContrastParser.add_argument('COLOR2', type=int, help='Must be between 0 and 256')
168+
169+
printContrastParser = subparsers.add_parser('filterContrast', help='Print out all the combos that meet a given delta.')
170+
printContrastParser.add_argument('DELTA', type=int, help='Pick a color delta')
171+
172+
168173
args = parser.parse_args()
169174

170175
if args.command == 'dullFg':
@@ -188,5 +193,7 @@ def getAllFgBgWithDiff(delta):
188193
elif args.command == 'contrast':
189194
print(f'Difference between two colors is: {getContrast(args.COLOR1, args.COLOR2)}')
190195
testForegroundOnBackground(args.COLOR1, args.COLOR2)
196+
elif args.command == 'filterContrast':
197+
getAllFgBgWithDiff(args.DELTA)
191198
else:
192199
parser.print_help()

0 commit comments

Comments
 (0)