Git Product home page Git Product logo

Comments (6)

dbordak avatar dbordak commented on July 16, 2024

That is odd, but sounds familiar... Are you on OSX? I seem to recall something about Emacs on OSX having screwed up colors in images (the color discrepancy in your image is between stuff that is rendered as text and stuff that is rendered as images)

EDIT: Err.. OSX, MacOS, whatever they call it these days :/

from telephone-line.

mathsaey avatar mathsaey commented on July 16, 2024

That seems to be the problem I'm dealing with. Adding (setq ns-use-srgb-colorspace nil) to my config seems to fix the issue. Unfortunately, that just disables srgb colors everywhere, which makes everything look rather ugly.

Thanks for the pointer! I'll see if I can find a better workaround and post it here if I find something.

from telephone-line.

dbordak avatar dbordak commented on July 16, 2024

I looked into it a bit, there's a patched version of emacs over here: https://github.com/railwaycat/homebrew-emacsmacport

I can also patch it within telephone-line, but considering how there's something like this unpatched in upstream, shouldn't there be other things fixed in that? I don't know if it's right to fix one bug to help people use the more buggy version, if you know what I mean.

from telephone-line.

mathsaey avatar mathsaey commented on July 16, 2024

I can also patch it within telephone-line, but considering how there's something like this unpatched in upstream, shouldn't there be other things fixed in that? I don't know if it's right to fix one bug to help people use the more buggy version, if you know what I mean.

Powerline (and some other plugins) seem to have built-in workarounds, but I agree with your approach.

Thanks for looking into this!

from telephone-line.

mathsaey avatar mathsaey commented on July 16, 2024

I closed this since this seems to be an upstream problem. If I do find some workaround (which does not rely on the mac port), I'll post it here.

from telephone-line.

seagle0128 avatar seagle0128 commented on July 16, 2024

(setq ns-use-srgb-colorspace nil) works for me as a workaround.

In powerline, colors are converted from sRGB color space to Apple RGB on macOS.

(defun pl/color-srgb-to-apple-rgb (red green blue)
  "Convert RED GREEN BLUE colors from sRGB color space to Apple RGB.
RED, GREEN and BLUE should be between 0.0 and 1.0, inclusive."
  (apply 'pl/color-xyz-to-apple-rgb (color-srgb-to-xyz red green blue)))

(defun pl/hex-color (color)
  "Get the hexadecimal value of COLOR."
  (when color
    (let ((srgb-color (color-name-to-rgb color)))
      (if powerline-image-apple-rgb
          (apply 'color-rgb-to-hex (apply 'pl/color-srgb-to-apple-rgb srgb-color))
        (apply 'color-rgb-to-hex srgb-color)))))

from telephone-line.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.