{"id":19263541,"url":"https://github.com/trapd00r/term-extendedcolor-xresources","last_synced_at":"2026-03-13T01:32:07.345Z","repository":{"id":1273513,"uuid":"1212746","full_name":"trapd00r/Term-ExtendedColor-Xresources","owner":"trapd00r","description":"Query and set various X resources","archived":false,"fork":false,"pushed_at":"2024-06-08T08:07:57.000Z","size":317,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T18:43:40.082Z","etag":null,"topics":["colorschemes","perl","terminal-colors","xorg","xresources"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trapd00r.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"trapd00r"}},"created_at":"2011-01-01T18:46:02.000Z","updated_at":"2023-03-19T00:01:35.000Z","dependencies_parsed_at":"2024-11-09T19:36:57.007Z","dependency_job_id":"90a664bd-a17c-4498-b401-4530c1d32a3a","html_url":"https://github.com/trapd00r/Term-ExtendedColor-Xresources","commit_stats":{"total_commits":35,"total_committers":4,"mean_commits":8.75,"dds":0.5714285714285714,"last_synced_commit":"e677686d863abbfad0ad408900f6b5da15ebf91a"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/trapd00r/Term-ExtendedColor-Xresources","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2FTerm-ExtendedColor-Xresources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2FTerm-ExtendedColor-Xresources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2FTerm-ExtendedColor-Xresources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2FTerm-ExtendedColor-Xresources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trapd00r","download_url":"https://codeload.github.com/trapd00r/Term-ExtendedColor-Xresources/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2FTerm-ExtendedColor-Xresources/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260294441,"owners_count":22987620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["colorschemes","perl","terminal-colors","xorg","xresources"],"created_at":"2024-11-09T19:36:09.959Z","updated_at":"2026-03-13T01:32:07.276Z","avatar_url":"https://github.com/trapd00r.png","language":"Perl","funding_links":["https://github.com/sponsors/trapd00r"],"categories":[],"sub_categories":[],"readme":"NAME\n    Term::ExtendedColor::Xresources - Query and set various Xresources\n\nSYNOPSIS\n        use Term::ExtendedColor::Xresources qw(\n          get_xterm_color\n          set_xterm_color\n          set_foreground_color\n          set_background_color\n        );\n\n        # make color index 220 represent red instead of yellow\n        set_xterm_color({ 220 =\u003e 'ff0000'});\n\n        # get RGB values for all defined colors\n        my $colors = get_xterm_color({\n          index =\u003e [0 .. 255], # default\n          type  =\u003e 'hex',      # default is base 10\n        });\n\n        # change the background color to red...\n        set_background_color('ff0000');\n\n        # .. and the foreground color to yellow\n        set_foreground_color('ffff00');\n\nDESCRIPTION\n    Term::ExtendedColor::Xresources provides functions for changing and\n    querying the underlying X terminal emulator for various X resources.\n\nEXPORTS\n    None by default.\n\nFUNCTIONS\n  set_xterm_color()\n      # Switch yellow and red\n      my $new_colors = set_xterm_color({\n        220 =\u003e 'ff0000',\n        196 =\u003e 'ffff00',\n      });\n\n      print $_ for values %{$new_colors};\n\n      # or just...\n\n      set_xterm_color({ 100 =\u003e ff0066});\n\n    Expects a hash reference where the keys are color indexes (0 .. 255) and\n    the values hexadecimal representations of the color values.\n\n    Changes the colors if called in void context. Else, returns a hash with\n    the indexes as keys and the appropriate escape sequences as values.\n\n  get_xterm_color()\n      my $defined_colors = get_xterm_color({ index =\u003e [0 .. 255], type =\u003e 'dec' });\n\n      print $defined_colors-\u003e{4}-\u003e{red}, \"\\n\";\n      print $defined_colors-\u003e{8}-\u003e{rgb}, \"\\n\";\n\n    0 - 15 is the standard *ANSI* colors, all above them are extended\n    colors.\n\n    Returns a hash reference with the index colors as keys. By default the\n    color values are in decimal.\n\n    The color values can be accessed by using their name:\n\n      my $red = $colors-\u003e{10}-\u003e{red};\n\n    Or by using the short notation:\n\n      my $red = $colors-\u003e{10}-\u003e{r};\n\n    The full color string can be retrieved like so:\n\n      my $rgb = $colors-\u003e{10}-\u003e{rgb};\n\n    The \"raw\" element is the full, raw response from the terminal, including\n    escape sequences.\n\n    The following arguments are supported:\n\n    index =\u003e $index | \\@indexes\n        Arrayref of color indexes to look up and return. Defaults to\n        [0..255], i.e. all indexes. Alternately a single index may be\n        passed.\n\n    type =\u003e 'dec' | 'hex'\n        May be 'dec' or 'hex'. The default is 'dec' (decimal) which returns\n        color values as integers between 0 and 255, and returns a 'rgb'\n        string of the form '$r/$g/$b' e.g. '255/0/0'. If 'hex' is passed,\n        returns color values in base 16, zero-padded to two characters\n        (between 00 and ff) and a 'rgb' string of the form '$r$g$b' e.g.\n        'ff0000'\n\n  get_xterm_colors()\n    The same thing as get_xterm_color(). Will be deprecated.\n\n  set_foreground_color()\n      set_foreground_color('ff0000');\n\n      my $fg = set_foreground_color('c0ffee');\n\n    Sets the foreground color if called in void context. Else, the\n    appropriate escape sequence is returned.\n\n  set_background_color()\n      set_background_color('121212');\n\n      my $bg = set_foreground_color('000000');\n\n    Sets the foreground color if called in void context. Else, the\n    appropriate escape sequence is returned.\n\nSEE ALSO\n    Term::ExtendedColor\n\nAUTHOR\n      Magnus Woldrich\n      CPAN ID: WOLDRICH\n      m@japh.se\n      http://japh.se\n\nCONTRIBUTORS\n    None required yet.\n\nCOPYRIGHT\n    Copyright 2010, 2011 the Term::ExtendedColor::Xresources \"AUTHOR\" and\n    \"CONTRIBUTORS\" as listed above.\n\nLICENSE\n    This library is free software; you may redistribute it and/or modify it\n    under the same terms as Perl itself.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapd00r%2Fterm-extendedcolor-xresources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrapd00r%2Fterm-extendedcolor-xresources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapd00r%2Fterm-extendedcolor-xresources/lists"}