#!/usr/bin/perl use Gtk3 -init; my $color = Gtk3::Gdk::Color::parse ($ARGV[0]); my $complement = $color->copy; $complement->red(255 - $complement->red); $complement->green(255 - $complement->green); $complement->blue(255 - $complement->blue); printf "%s\n", $complement->to_string;