{"id":245,"date":"2022-06-14T23:05:17","date_gmt":"2022-06-14T23:05:17","guid":{"rendered":"https:\/\/jl.bibaud.com\/?p=245"},"modified":"2022-06-15T01:44:08","modified_gmt":"2022-06-15T01:44:08","slug":"background-colour-picker","status":"publish","type":"post","link":"https:\/\/jl.bibaud.com\/index.php\/2022\/06\/14\/background-colour-picker\/","title":{"rendered":"Background Colour picker"},"content":{"rendered":"\n<p>This is a python program that cuts your desktop picture into rectangles, representing  your shortcuts. It then gives you the ideal colour for each shortcut based on the background picture.<\/p>\n\n\n\n<p>This program is remarkably compact at only 70 lines. It was quite interesting to make, I would love to try to make it in some other language like C.<\/p>\n\n\n\n<p>Below is a small demo showing it cutting and (for debug purposes) saving each fragment. It then makes a picture with each rectangle the recommended colour, which you can see at the end.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"nv-iframe-embed\"><iframe loading=\"lazy\" title=\"Desktop Icon colour detector\" width=\"1200\" height=\"900\" src=\"https:\/\/www.youtube.com\/embed\/3oHlz-yyG9o?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/div>\n<\/div><\/figure>\n\n\n\n<p>If you want the code, simply contact me \ud83d\ude42<\/p>\n\n\n\n<p>Example with comparison:<\/p>\n\n\n\n<div class=\"wp-block-ideabox-image-comparison\"><div class=\"ib-image-comparison label-pos--middle twentytwenty-container\" data-offset=\"0.5\" data-orientation=\"horizontal\" data-before=\"Before\" data-after=\"After\" data-no-overlay=\"false\" data-on-hover=\"false\" data-on-swipe=\"true\" data-on-click=\"false\" style=\"--ibic-overlay-color:rgba(0, 0, 0, 0.2);--ibic-overlay-hover-color:rgba(0, 0, 0, 0.4)\"><img decoding=\"async\" src=\"https:\/\/jl.bibaud.com\/wp-content\/uploads\/2022\/06\/TranscodedWallpaper.jpg\" alt=\"\" class=\"ib-image-comparison-img\"\/><img decoding=\"async\" src=\"https:\/\/jl.bibaud.com\/wp-content\/uploads\/2022\/06\/vlcsnap-2022-06-15-01h03m25s510-2.png\" alt=\"\" class=\"ib-image-comparison-img\"\/><\/div><\/div>\n\n\n\n<p>Ps: This is rallycross at Spa \ud83d\ude0c<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a python program that cuts your desktop picture into rectangles, representing your shortcuts. It then gives you the ideal colour for each shortcut based on the background picture. This program is remarkably compact at only 70 lines. It was quite interesting to make, I would love to try to make it in some&hellip;&nbsp;<a href=\"https:\/\/jl.bibaud.com\/index.php\/2022\/06\/14\/background-colour-picker\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Background Colour picker<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":247,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","cybocfi_hide_featured_image":"","footnotes":""},"categories":[26],"tags":[],"class_list":["post-245","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/jl.bibaud.com\/index.php\/wp-json\/wp\/v2\/posts\/245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jl.bibaud.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jl.bibaud.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jl.bibaud.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jl.bibaud.com\/index.php\/wp-json\/wp\/v2\/comments?post=245"}],"version-history":[{"count":2,"href":"https:\/\/jl.bibaud.com\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions"}],"predecessor-version":[{"id":271,"href":"https:\/\/jl.bibaud.com\/index.php\/wp-json\/wp\/v2\/posts\/245\/revisions\/271"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jl.bibaud.com\/index.php\/wp-json\/wp\/v2\/media\/247"}],"wp:attachment":[{"href":"https:\/\/jl.bibaud.com\/index.php\/wp-json\/wp\/v2\/media?parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jl.bibaud.com\/index.php\/wp-json\/wp\/v2\/categories?post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jl.bibaud.com\/index.php\/wp-json\/wp\/v2\/tags?post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}