[Libreoffice-commits] core.git: 2 commits - include/vcl sfx2/CppunitTest_sfx2_misc.mk vcl/headless vcl/inc vcl/opengl vcl/osx vcl/qt5 vcl/quartz vcl/source vcl/unx vcl/win writerperfect/Library_writerperfect.mk xmlsecurity/Executable_pdfverify.mk

Noel Grandin noel.grandin at collabora.co.uk
Mon Mar 26 06:45:13 UTC 2018


 include/vcl/metaact.hxx                  |    1 
 include/vcl/outdevstate.hxx              |   17 ++---
 include/vcl/pdfwriter.hxx                |    1 
 include/vcl/salgtype.hxx                 |   12 ---
 sfx2/CppunitTest_sfx2_misc.mk            |    5 +
 vcl/headless/svpgdi.cxx                  |   88 ++++++++++++-------------
 vcl/headless/svptext.cxx                 |    4 -
 vcl/inc/headless/svpgdi.hxx              |   18 ++---
 vcl/inc/opengl/LineRenderUtils.hxx       |    2 
 vcl/inc/opengl/RenderList.hxx            |   12 +--
 vcl/inc/opengl/VertexUtils.hxx           |   12 +--
 vcl/inc/opengl/program.hxx               |    4 -
 vcl/inc/openglgdiimpl.hxx                |   28 ++++----
 vcl/inc/outdata.hxx                      |    5 -
 vcl/inc/quartz/salbmp.h                  |    2 
 vcl/inc/quartz/salgdi.h                  |   12 +--
 vcl/inc/quartz/salgdicommon.hxx          |    9 --
 vcl/inc/salgdi.hxx                       |   18 ++---
 vcl/inc/salgdiimpl.hxx                   |   11 +--
 vcl/inc/textrender.hxx                   |    2 
 vcl/inc/unx/cairotextrender.hxx          |    4 -
 vcl/inc/unx/genpspgraphics.h             |   12 +--
 vcl/inc/unx/saldisp.hxx                  |   12 +--
 vcl/inc/unx/salgdi.h                     |   24 +++----
 vcl/inc/win/salgdi.h                     |   14 ++--
 vcl/opengl/LineRenderUtils.cxx           |    8 +-
 vcl/opengl/RenderList.cxx                |   18 ++---
 vcl/opengl/gdiimpl.cxx                   |   58 ++++++++---------
 vcl/opengl/program.cxx                   |   16 ++--
 vcl/osx/a11ytextattributeswrapper.mm     |    6 -
 vcl/osx/salinst.cxx                      |    2 
 vcl/qt5/Qt5Graphics.cxx                  |    6 -
 vcl/qt5/Qt5Graphics.hxx                  |   18 ++---
 vcl/qt5/Qt5Graphics_GDI.cxx              |   12 +--
 vcl/qt5/Qt5Graphics_Text.cxx             |    2 
 vcl/quartz/salbmp.cxx                    |    8 +-
 vcl/quartz/salgdi.cxx                    |    6 -
 vcl/quartz/salgdicommon.cxx              |   34 +++++-----
 vcl/source/gdi/salgdilayout.cxx          |    8 +-
 vcl/source/outdev/gradient.cxx           |   14 ++--
 vcl/source/outdev/mask.cxx               |    4 -
 vcl/source/outdev/outdevstate.cxx        |   30 +++-----
 vcl/source/outdev/pixel.cxx              |   10 --
 vcl/source/outdev/text.cxx               |    4 -
 vcl/source/outdev/textline.cxx           |   10 +-
 vcl/unx/generic/app/saldisp.cxx          |  105 +++++++++++++++----------------
 vcl/unx/generic/gdi/cairotextrender.cxx  |   14 ++--
 vcl/unx/generic/gdi/font.cxx             |    6 -
 vcl/unx/generic/gdi/gdiimpl.cxx          |   76 +++++++++++-----------
 vcl/unx/generic/gdi/gdiimpl.hxx          |   14 ++--
 vcl/unx/generic/gdi/salbmp.cxx           |   16 ++--
 vcl/unx/generic/gdi/salgdi.cxx           |   50 +++++++-------
 vcl/unx/generic/gdi/salgdi2.cxx          |    4 -
 vcl/unx/generic/gdi/xrender_peer.hxx     |   10 +-
 vcl/unx/generic/print/genpspgraphics.cxx |   36 +++++-----
 vcl/win/gdi/gdiimpl.cxx                  |   75 ++++++++++------------
 vcl/win/gdi/gdiimpl.hxx                  |   14 ++--
 vcl/win/gdi/salfont.cxx                  |   10 +-
 vcl/win/gdi/salgdi.cxx                   |   20 ++---
 vcl/win/gdi/salgdi2.cxx                  |    4 -
 vcl/win/gdi/salnativewidgets-luna.cxx    |    4 -
 vcl/win/gdi/winlayout.cxx                |    6 -
 writerperfect/Library_writerperfect.mk   |    1 
 xmlsecurity/Executable_pdfverify.mk      |    2 
 64 files changed, 519 insertions(+), 551 deletions(-)

New commits:
commit 38e7aef0fad58dcf2d59a7c219b7858d6c4cd771
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Mar 23 11:52:20 2018 +0200

    use boost::optional in OutDevState
    
    Change-Id: I83fb85fcba6cd2a5dc4f99fdfd3238d72afb7bc2
    Reviewed-on: https://gerrit.libreoffice.org/51770
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 9fac991ac19e..930261b5866f 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -36,7 +36,6 @@
 #include <vcl/gfxlink.hxx>
 #include <vcl/lineinfo.hxx>
 #include <vcl/metaactiontypes.hxx>
-#include <vcl/outdevstate.hxx>
 
 class SvStream;
 enum class DrawTextFlags;
diff --git a/include/vcl/outdevstate.hxx b/include/vcl/outdevstate.hxx
index d58faac00c52..d1f1ff6726b9 100644
--- a/include/vcl/outdevstate.hxx
+++ b/include/vcl/outdevstate.hxx
@@ -30,6 +30,7 @@
 #include <tools/fontenum.hxx>
 #include <o3tl/typed_flags_set.hxx>
 #include <memory>
+#include <boost/optional.hpp>
 
 class Color;
 
@@ -80,17 +81,17 @@ public:
     OutDevState();
     ~OutDevState();
 
-    std::unique_ptr<MapMode>        mpMapMode;
+    boost::optional<MapMode>        mpMapMode;
     bool            mbMapActive;
     std::unique_ptr<vcl::Region>    mpClipRegion;
-    std::unique_ptr<Color>          mpLineColor;
-    std::unique_ptr<Color>          mpFillColor;
+    boost::optional<Color>          mpLineColor;
+    boost::optional<Color>          mpFillColor;
     std::unique_ptr<vcl::Font>      mpFont;
-    std::unique_ptr<Color>          mpTextColor;
-    std::unique_ptr<Color>          mpTextFillColor;
-    std::unique_ptr<Color>          mpTextLineColor;
-    std::unique_ptr<Color>          mpOverlineColor;
-    std::unique_ptr<Point>          mpRefPoint;
+    boost::optional<Color>          mpTextColor;
+    boost::optional<Color>          mpTextFillColor;
+    boost::optional<Color>          mpTextLineColor;
+    boost::optional<Color>          mpOverlineColor;
+    boost::optional<Point>          mpRefPoint;
     TextAlign       meTextAlign;
     RasterOp        meRasterOp;
     ComplexTextLayoutFlags  mnTextLayoutMode;
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 758acdb1f08d..1e38a9f67cb8 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -29,7 +29,6 @@
 #include <vcl/vclenum.hxx>
 #include <vcl/font.hxx>
 #include <vcl/graphictools.hxx>
-#include <vcl/outdevstate.hxx>
 #include <vcl/outdev.hxx>
 
 #include <com/sun/star/io/XOutputStream.hpp>
diff --git a/sfx2/CppunitTest_sfx2_misc.mk b/sfx2/CppunitTest_sfx2_misc.mk
index 0919d525d3d5..c97d97ca469b 100644
--- a/sfx2/CppunitTest_sfx2_misc.mk
+++ b/sfx2/CppunitTest_sfx2_misc.mk
@@ -27,7 +27,10 @@ $(eval $(call gb_CppunitTest_use_libraries,sfx2_misc, \
 	utl \
 ))
 
-$(eval $(call gb_CppunitTest_use_external,sfx2_misc,libxml2))
+$(eval $(call gb_CppunitTest_use_externals,sfx2_misc,\
+	libxml2 \
+	boost_headers \
+))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,sfx2_misc))
 
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 38698b210330..d2226add6f1b 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -31,17 +31,9 @@
 #include <salgdi.hxx>
 
 OutDevState::OutDevState()
-    : mpMapMode(nullptr)
-    , mbMapActive(false)
+    : mbMapActive(false)
     , mpClipRegion(nullptr)
-    , mpLineColor(nullptr)
-    , mpFillColor(nullptr)
     , mpFont(nullptr)
-    , mpTextColor(nullptr)
-    , mpTextFillColor(nullptr)
-    , mpTextLineColor(nullptr)
-    , mpOverlineColor(nullptr)
-    , mpRefPoint(nullptr)
     , meTextAlign(ALIGN_TOP)
     , meRasterOp(RasterOp::OverPaint)
     , mnTextLayoutMode(ComplexTextLayoutFlags::Default)
@@ -76,27 +68,27 @@ void OutputDevice::Push( PushFlags nFlags )
 
     if (nFlags & PushFlags::LINECOLOR && mbLineColor)
     {
-        pState->mpLineColor.reset( new Color( maLineColor ) );
+        pState->mpLineColor = maLineColor;
     }
     if (nFlags & PushFlags::FILLCOLOR && mbFillColor)
     {
-        pState->mpFillColor.reset( new Color( maFillColor ) );
+        pState->mpFillColor = maFillColor;
     }
     if ( nFlags & PushFlags::FONT )
         pState->mpFont.reset( new vcl::Font( maFont ) );
     if ( nFlags & PushFlags::TEXTCOLOR )
-        pState->mpTextColor.reset( new Color( GetTextColor() ) );
+        pState->mpTextColor = GetTextColor();
     if (nFlags & PushFlags::TEXTFILLCOLOR && IsTextFillColor())
     {
-        pState->mpTextFillColor.reset( new Color( GetTextFillColor() ) );
+        pState->mpTextFillColor = GetTextFillColor();
     }
     if (nFlags & PushFlags::TEXTLINECOLOR && IsTextLineColor())
     {
-        pState->mpTextLineColor.reset( new Color( GetTextLineColor() ) );
+        pState->mpTextLineColor = GetTextLineColor();
     }
     if (nFlags & PushFlags::OVERLINECOLOR && IsOverlineColor())
     {
-        pState->mpOverlineColor.reset( new Color( GetOverlineColor() ) );
+        pState->mpOverlineColor = GetOverlineColor();
     }
     if ( nFlags & PushFlags::TEXTALIGN )
         pState->meTextAlign = GetTextAlign();
@@ -108,7 +100,7 @@ void OutputDevice::Push( PushFlags nFlags )
         pState->meRasterOp = GetRasterOp();
     if ( nFlags & PushFlags::MAPMODE )
     {
-        pState->mpMapMode.reset( new MapMode( maMapMode ) );
+        pState->mpMapMode = maMapMode;
         pState->mbMapActive = mbMap;
     }
     if (nFlags & PushFlags::CLIPREGION && mbClipRegion)
@@ -117,7 +109,7 @@ void OutputDevice::Push( PushFlags nFlags )
     }
     if (nFlags & PushFlags::REFPOINT && mbRefPoint)
     {
-        pState->mpRefPoint.reset( new Point( maRefPoint ) );
+        pState->mpRefPoint = maRefPoint;
     }
 
     mpOutDevStateStack->push_back( pState );
diff --git a/writerperfect/Library_writerperfect.mk b/writerperfect/Library_writerperfect.mk
index fd7e344822f3..64df2cba94c2 100644
--- a/writerperfect/Library_writerperfect.mk
+++ b/writerperfect/Library_writerperfect.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_Library_set_include,writerperfect, \
 ))
 
 $(eval $(call gb_Library_use_externals,writerperfect,\
+	boost_headers \
 	odfgen \
 	revenge \
 ))
diff --git a/xmlsecurity/Executable_pdfverify.mk b/xmlsecurity/Executable_pdfverify.mk
index 11c22d1d7ea6..ed8e9559fc18 100644
--- a/xmlsecurity/Executable_pdfverify.mk
+++ b/xmlsecurity/Executable_pdfverify.mk
@@ -11,6 +11,8 @@ $(eval $(call gb_Executable_Executable,pdfverify))
 
 $(eval $(call gb_Executable_use_sdk_api,pdfverify))
 
+$(eval $(call gb_Executable_use_external,pdfverify,boost_headers))
+
 $(eval $(call gb_Executable_set_include,pdfverify,\
     $$(INCLUDE) \
     -I$(SRCDIR)/xmlsecurity/inc \
commit bea081b5099786e5fcadddd72c247b9a9488286a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Mar 14 11:11:02 2018 +0200

    replace SalColor with Color
    
    Change-Id: I615640a378a61cf6e44e84a647ce06bdd8a52807
    Reviewed-on: https://gerrit.libreoffice.org/51239
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/vcl/salgtype.hxx b/include/vcl/salgtype.hxx
index 51f81d6c737b..0e37300f3dbd 100644
--- a/include/vcl/salgtype.hxx
+++ b/include/vcl/salgtype.hxx
@@ -22,6 +22,7 @@
 
 #include <sal/types.h>
 #include <o3tl/typed_flags_set.hxx>
+#include <tools/color.hxx>
 
 enum class DeviceFormat {
                             NONE = -1,
@@ -32,16 +33,7 @@ enum class DeviceFormat {
 #endif
                         };
 
-typedef sal_uInt32 SalColor;
-
-constexpr SalColor MAKE_SALCOLOR(sal_uInt8 r, sal_uInt8 g, sal_uInt8 b) {
-    return sal_uInt32(b) | (sal_uInt32(g) << 8) | (sal_uInt32(r) << 16);
-}
-
-#define SALCOLOR_RED( n )           (static_cast<sal_uInt8>((n)>>16))
-#define SALCOLOR_GREEN( n )         (static_cast<sal_uInt8>((static_cast<sal_uInt16>(n)) >> 8))
-#define SALCOLOR_BLUE( n )          (static_cast<sal_uInt8>(n))
-#define SALCOLOR_NONE           (~SalColor(0))
+constexpr ::Color SALCOLOR_NONE ( 0xFF, 0xFF, 0xFF, 0xFF );
 
 // must equal to class Point
 struct SalPoint
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 2d9694cc7a88..487796755ec5 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -522,9 +522,9 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
 
     if (m_aFillColor != SALCOLOR_NONE)
     {
-        cairo_set_source_rgba(cr, SALCOLOR_RED(m_aFillColor)/255.0,
-                                  SALCOLOR_GREEN(m_aFillColor)/255.0,
-                                  SALCOLOR_BLUE(m_aFillColor)/255.0,
+        cairo_set_source_rgba(cr, m_aFillColor.GetRed()/255.0,
+                                  m_aFillColor.GetGreen()/255.0,
+                                  m_aFillColor.GetBlue()/255.0,
                                   fTransparency);
 
         if (m_aLineColor == SALCOLOR_NONE)
@@ -535,9 +535,9 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
 
     if (m_aLineColor != SALCOLOR_NONE)
     {
-        cairo_set_source_rgba(cr, SALCOLOR_RED(m_aLineColor)/255.0,
-                                  SALCOLOR_GREEN(m_aLineColor)/255.0,
-                                  SALCOLOR_BLUE(m_aLineColor)/255.0,
+        cairo_set_source_rgba(cr, m_aLineColor.GetRed()/255.0,
+                                  m_aLineColor.GetGreen()/255.0,
+                                  m_aLineColor.GetBlue()/255.0,
                                   fTransparency);
 
         extents = getClippedStrokeDamage(cr);
@@ -553,8 +553,8 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
 SvpSalGraphics::SvpSalGraphics()
     : m_pSurface(nullptr)
     , m_fScale(1.0)
-    , m_aLineColor(MAKE_SALCOLOR(0x00, 0x00, 0x00))
-    , m_aFillColor(MAKE_SALCOLOR(0xFF, 0xFF, 0XFF))
+    , m_aLineColor(Color(0x00, 0x00, 0x00))
+    , m_aFillColor(Color(0xFF, 0xFF, 0XFF))
     , m_ePaintMode(PaintMode::Over)
     , m_aTextRenderImpl(*this)
 {
@@ -607,9 +607,9 @@ void SvpSalGraphics::SetLineColor()
     m_aLineColor = SALCOLOR_NONE;
 }
 
-void SvpSalGraphics::SetLineColor( SalColor nSalColor )
+void SvpSalGraphics::SetLineColor( Color nColor )
 {
-    m_aLineColor = nSalColor;
+    m_aLineColor = nColor;
 }
 
 void SvpSalGraphics::SetFillColor()
@@ -617,9 +617,9 @@ void SvpSalGraphics::SetFillColor()
     m_aFillColor = SALCOLOR_NONE;
 }
 
-void SvpSalGraphics::SetFillColor( SalColor nSalColor )
+void SvpSalGraphics::SetFillColor( Color nColor )
 {
-    m_aFillColor = nSalColor;
+    m_aFillColor = nColor;
 }
 
 void SvpSalGraphics::SetXORMode(bool bSet )
@@ -632,13 +632,13 @@ void SvpSalGraphics::SetROPLineColor( SalROPColor nROPColor )
     switch( nROPColor )
     {
         case SalROPColor::N0:
-            m_aLineColor = MAKE_SALCOLOR(0, 0, 0);
+            m_aLineColor = Color(0, 0, 0);
             break;
         case SalROPColor::N1:
-            m_aLineColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
+            m_aLineColor = Color(0xff, 0xff, 0xff);
             break;
         case SalROPColor::Invert:
-            m_aLineColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
+            m_aLineColor = Color(0xff, 0xff, 0xff);
             break;
     }
 }
@@ -648,13 +648,13 @@ void SvpSalGraphics::SetROPFillColor( SalROPColor nROPColor )
     switch( nROPColor )
     {
         case SalROPColor::N0:
-            m_aFillColor = MAKE_SALCOLOR(0, 0, 0);
+            m_aFillColor = Color(0, 0, 0);
             break;
         case SalROPColor::N1:
-            m_aFillColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
+            m_aFillColor = Color(0xff, 0xff, 0xff);
             break;
         case SalROPColor::Invert:
-            m_aFillColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
+            m_aFillColor = Color(0xff, 0xff, 0xff);
             break;
     }
 }
@@ -667,14 +667,14 @@ void SvpSalGraphics::drawPixel( long nX, long nY )
     }
 }
 
-void SvpSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
+void SvpSalGraphics::drawPixel( long nX, long nY, Color nColor )
 {
-    SalColor aOrigFillColor = m_aFillColor;
-    SalColor aOrigLineColor = m_aLineColor;
+    Color aOrigFillColor = m_aFillColor;
+    Color aOrigLineColor = m_aLineColor;
 
     basegfx::B2DPolygon aRect = basegfx::utils::createPolygonFromRect(basegfx::B2DRectangle(nX, nY, nX+1, nY+1));
     m_aLineColor = SALCOLOR_NONE;
-    m_aFillColor = nSalColor;
+    m_aFillColor = nColor;
 
     drawPolyPolygon(basegfx::B2DPolyPolygon(aRect));
 
@@ -685,8 +685,8 @@ void SvpSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
 void SvpSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )
 {
     // because of the -1 hack we have to do fill and draw separately
-    SalColor aOrigFillColor = m_aFillColor;
-    SalColor aOrigLineColor = m_aLineColor;
+    Color aOrigFillColor = m_aFillColor;
+    Color aOrigLineColor = m_aLineColor;
     m_aFillColor = SALCOLOR_NONE;
     m_aLineColor = SALCOLOR_NONE;
 
@@ -939,9 +939,9 @@ bool SvpSalGraphics::drawPolyLine(
         }
     }
 
-    cairo_set_source_rgba(cr, SALCOLOR_RED(m_aLineColor)/255.0,
-                              SALCOLOR_GREEN(m_aLineColor)/255.0,
-                              SALCOLOR_BLUE(m_aLineColor)/255.0,
+    cairo_set_source_rgba(cr, m_aLineColor.GetRed()/255.0,
+                              m_aLineColor.GetGreen()/255.0,
+                              m_aLineColor.GetBlue()/255.0,
                               1.0-fTransparency);
 
     cairo_set_line_join(cr, eCairoLineJoin);
@@ -1034,9 +1034,9 @@ bool SvpSalGraphics::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly, d
 
     if (m_aFillColor != SALCOLOR_NONE)
     {
-        cairo_set_source_rgba(cr, SALCOLOR_RED(m_aFillColor)/255.0,
-                                  SALCOLOR_GREEN(m_aFillColor)/255.0,
-                                  SALCOLOR_BLUE(m_aFillColor)/255.0,
+        cairo_set_source_rgba(cr, m_aFillColor.GetRed()/255.0,
+                                  m_aFillColor.GetGreen()/255.0,
+                                  m_aFillColor.GetBlue()/255.0,
                                   1.0-fTransparency);
 
         if (m_aLineColor == SALCOLOR_NONE)
@@ -1047,9 +1047,9 @@ bool SvpSalGraphics::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly, d
 
     if (m_aLineColor != SALCOLOR_NONE)
     {
-        cairo_set_source_rgba(cr, SALCOLOR_RED(m_aLineColor)/255.0,
-                                  SALCOLOR_GREEN(m_aLineColor)/255.0,
-                                  SALCOLOR_BLUE(m_aLineColor)/255.0,
+        cairo_set_source_rgba(cr, m_aLineColor.GetRed()/255.0,
+                                  m_aLineColor.GetGreen()/255.0,
+                                  m_aLineColor.GetBlue()/255.0,
                                   1.0-fTransparency);
 
         extents = getClippedStrokeDamage(cr);
@@ -1062,18 +1062,18 @@ bool SvpSalGraphics::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly, d
     return true;
 }
 
-void SvpSalGraphics::applyColor(cairo_t *cr, SalColor aColor)
+void SvpSalGraphics::applyColor(cairo_t *cr, Color aColor)
 {
     if (cairo_surface_get_content(m_pSurface) == CAIRO_CONTENT_COLOR_ALPHA)
     {
-        cairo_set_source_rgba(cr, SALCOLOR_RED(aColor)/255.0,
-                                  SALCOLOR_GREEN(aColor)/255.0,
-                                  SALCOLOR_BLUE(aColor)/255.0,
+        cairo_set_source_rgba(cr, aColor.GetRed()/255.0,
+                                  aColor.GetGreen()/255.0,
+                                  aColor.GetBlue()/255.0,
                                   1.0);
     }
     else
     {
-        double fSet = aColor == sal_uInt32(COL_BLACK) ? 1.0 : 0.0;
+        double fSet = aColor == COL_BLACK ? 1.0 : 0.0;
         cairo_set_source_rgba(cr, 1, 1, 1, fSet);
         cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
     }
@@ -1226,7 +1226,7 @@ static sal_uInt8 premultiply(sal_uInt8 c, sal_uInt8 a)
 
 void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
                                const SalBitmap& rSalBitmap,
-                               SalColor nMaskColor )
+                               Color nMaskColor )
 {
     /** creates an image from the given rectangle, replacing all black pixels
      *  with nMaskColor and make all other full transparent */
@@ -1244,9 +1244,9 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
             sal_uInt8 r = unpremultiply(data[SVP_CAIRO_RED], data[SVP_CAIRO_ALPHA]);
             if (r == 0 && g == 0 && b == 0)
             {
-                data[0] = SALCOLOR_BLUE(nMaskColor);
-                data[1] = SALCOLOR_GREEN(nMaskColor);
-                data[2] = SALCOLOR_RED(nMaskColor);
+                data[0] = nMaskColor.GetBlue();
+                data[1] = nMaskColor.GetGreen();
+                data[2] = nMaskColor.GetRed();
                 data[3] = 0xff;
             }
             else
@@ -1318,7 +1318,7 @@ SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeigh
     return pBitmap;
 }
 
-SalColor SvpSalGraphics::getPixel( long nX, long nY )
+Color SvpSalGraphics::getPixel( long nX, long nY )
 {
     cairo_surface_t *target = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 1, 1);
     cairo_t* cr = cairo_create(target);
@@ -1333,7 +1333,7 @@ SalColor SvpSalGraphics::getPixel( long nX, long nY )
     sal_uInt8 b = unpremultiply(data[SVP_CAIRO_BLUE], data[SVP_CAIRO_ALPHA]);
     sal_uInt8 g = unpremultiply(data[SVP_CAIRO_GREEN], data[SVP_CAIRO_ALPHA]);
     sal_uInt8 r = unpremultiply(data[SVP_CAIRO_RED], data[SVP_CAIRO_ALPHA]);
-    SalColor nRet = MAKE_SALCOLOR(r, g, b);
+    Color nRet = Color(r, g, b);
 
     cairo_surface_destroy(target);
 
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index 47f158d56b51..caa34e33f7b9 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -111,9 +111,9 @@ void SvpSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout)
     m_aTextRenderImpl.DrawTextLayout(rLayout);
 }
 
-void SvpSalGraphics::SetTextColor( SalColor nSalColor )
+void SvpSalGraphics::SetTextColor( Color nColor )
 {
-    m_aTextRenderImpl.SetTextColor(nSalColor);
+    m_aTextRenderImpl.SetTextColor(nColor);
 }
 
 #if ENABLE_CAIRO_CANVAS
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index b14be042ed67..28c453d0cfbe 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -86,8 +86,8 @@ class VCL_DLLPUBLIC SvpSalGraphics : public SalGraphics
     cairo_surface_t*               m_pSurface;
     basegfx::B2IVector             m_aFrameSize;
     double                         m_fScale;
-    SalColor                       m_aLineColor;
-    SalColor                       m_aFillColor;
+    Color                          m_aLineColor;
+    Color                          m_aFillColor;
     PaintMode                      m_ePaintMode;
 
 public:
@@ -99,7 +99,7 @@ private:
     void invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags);
     void copySource(const SalTwoRect& rTR, cairo_surface_t* source);
     void setupPolyPolygon(cairo_t* cr, const basegfx::B2DPolyPolygon& rPolyPoly);
-    void applyColor(cairo_t *cr, SalColor rColor);
+    void applyColor(cairo_t *cr, Color rColor);
     void drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly);
 protected:
     vcl::Region                         m_aClipRegion;
@@ -135,16 +135,16 @@ public:
     virtual bool            setClipRegion( const vcl::Region& ) override;
 
     virtual void            SetLineColor() override;
-    virtual void            SetLineColor( SalColor nSalColor ) override;
+    virtual void            SetLineColor( Color nColor ) override;
     virtual void            SetFillColor() override;
-    virtual void            SetFillColor( SalColor nSalColor ) override;
+    virtual void            SetFillColor( Color nColor ) override;
 
     virtual void            SetXORMode( bool bSet ) override;
 
     virtual void            SetROPLineColor( SalROPColor nROPColor ) override;
     virtual void            SetROPFillColor( SalROPColor nROPColor ) override;
 
-    virtual void            SetTextColor( SalColor nSalColor ) override;
+    virtual void            SetTextColor( Color nColor ) override;
     virtual void            SetFont( const FontSelectPattern*, int nFallbackLevel ) override;
     virtual void            GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
     virtual const FontCharMapRef GetFontCharMap() const override;
@@ -173,7 +173,7 @@ public:
     virtual void            DrawTextLayout( const CommonSalLayout& ) override;
     virtual bool            supportsOperation( OutDevSupportType ) const override;
     virtual void            drawPixel( long nX, long nY ) override;
-    virtual void            drawPixel( long nX, long nY, SalColor nSalColor ) override;
+    virtual void            drawPixel( long nX, long nY, Color nColor ) override;
     virtual void            drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
     virtual void            drawRect( long nX, long nY, long nWidth, long nHeight ) override;
     virtual bool            drawPolyPolygon( const basegfx::B2DPolyPolygon&, double fTransparency ) override;
@@ -216,9 +216,9 @@ public:
                                         const SalBitmap& rTransparentBitmap ) override;
     virtual void            drawMask( const SalTwoRect& rPosAry,
                                       const SalBitmap& rSalBitmap,
-                                      SalColor nMaskColor ) override;
+                                      Color nMaskColor ) override;
     virtual SalBitmap*      getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
-    virtual SalColor        getPixel( long nX, long nY ) override;
+    virtual Color           getPixel( long nX, long nY ) override;
     virtual void            invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ) override;
     virtual void            invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) override;
 
diff --git a/vcl/inc/opengl/LineRenderUtils.hxx b/vcl/inc/opengl/LineRenderUtils.hxx
index a3df1d6b5192..1fa4e785d5fe 100644
--- a/vcl/inc/opengl/LineRenderUtils.hxx
+++ b/vcl/inc/opengl/LineRenderUtils.hxx
@@ -29,7 +29,7 @@ private:
 
 public:
     LineBuilder(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndices,
-                SalColor nColor, GLfloat fTransparency,
+                Color nColor, GLfloat fTransparency,
                 GLfloat fLineWidth, bool bUseAA);
 
     void appendLineSegment(const glm::vec2& rPoint1, const glm::vec2& rNormal1, GLfloat aExtrusion1,
diff --git a/vcl/inc/opengl/RenderList.hxx b/vcl/inc/opengl/RenderList.hxx
index c356def2ff93..b8595921a46a 100644
--- a/vcl/inc/opengl/RenderList.hxx
+++ b/vcl/inc/opengl/RenderList.hxx
@@ -150,22 +150,22 @@ public:
         return maRenderEntries;
     }
 
-    void addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, SalColor nColor, const SalTwoRect& r2Rect);
+    void addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, Color nColor, const SalTwoRect& r2Rect);
 
-    void addDrawPixel(long nX, long nY, SalColor nColor);
+    void addDrawPixel(long nX, long nY, Color nColor);
 
     void addDrawRectangle(long nX, long nY, long nWidth, long nHeight, double fTransparency,
-                          SalColor nLineColor, SalColor nFillColor);
+                          Color nLineColor, Color nFillColor);
 
-    void addDrawLine(long nX1, long nY1, long nX2, long nY2, SalColor nLineColor, bool bUseAA);
+    void addDrawLine(long nX1, long nY1, long nX2, long nY2, Color nLineColor, bool bUseAA);
 
     void addDrawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, double fTransparency,
-                            SalColor nLineColor, SalColor nFillColor, bool bUseAA);
+                            Color nLineColor, Color nFillColor, bool bUseAA);
 
     void addDrawPolyLine(const basegfx::B2DPolygon& rPolygon, double fTransparency,
                          const basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin eLineJoin,
                          css::drawing::LineCap eLineCap, double fMiterMinimumAngle,
-                         SalColor nLineColor, bool bUseAA);
+                         Color nLineColor, bool bUseAA);
 };
 
 #endif // INCLUDED_VCL_INC_OPENGL_RENDERLIST_H
diff --git a/vcl/inc/opengl/VertexUtils.hxx b/vcl/inc/opengl/VertexUtils.hxx
index de2c070abcc9..4d4fd12a116a 100644
--- a/vcl/inc/opengl/VertexUtils.hxx
+++ b/vcl/inc/opengl/VertexUtils.hxx
@@ -43,19 +43,19 @@ inline void addRectangle<GL_TRIANGLE_FAN>(std::vector<GLfloat>& rVertices, GLflo
     });
 }
 
-inline void createColor(SalColor nColor, GLfloat fTransparency, GLubyte& nR, GLubyte& nG, GLubyte& nB, GLubyte& nA)
+inline void createColor(Color nColor, GLfloat fTransparency, GLubyte& nR, GLubyte& nG, GLubyte& nB, GLubyte& nA)
 {
-    nR = SALCOLOR_RED(nColor);
-    nG = SALCOLOR_GREEN(nColor);
-    nB = SALCOLOR_BLUE(nColor);
+    nR = nColor.GetRed();
+    nG = nColor.GetGreen();
+    nB = nColor.GetBlue();
     nA = (1.0f - fTransparency) * 255.0f;
 }
 
 template<GLenum TYPE>
-inline void addQuadColors(std::vector<GLubyte>& rColors, SalColor nColor, GLfloat fTransparency);
+inline void addQuadColors(std::vector<GLubyte>& rColors, Color nColor, GLfloat fTransparency);
 
 template<>
-inline void addQuadColors<GL_TRIANGLES>(std::vector<GLubyte>& rColors, SalColor nColor, GLfloat fTransparency)
+inline void addQuadColors<GL_TRIANGLES>(std::vector<GLubyte>& rColors, Color nColor, GLfloat fTransparency)
 {
     GLubyte nR, nG, nB, nA;
     createColor(nColor, fTransparency, nR, nG, nB, nA);
diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx
index 95d1c0e762d8..e18db93d57c4 100644
--- a/vcl/inc/opengl/program.hxx
+++ b/vcl/inc/opengl/program.hxx
@@ -87,8 +87,8 @@ public:
     void SetUniform2fv( const OString& rName, GLsizei nCount, GLfloat const * aValues );
     void SetUniform1i( const OString& rName, GLint v1 );
     void SetColor( const OString& rName, const Color& rColor );
-    void SetColor( const OString& rName, SalColor nColor, sal_uInt8 nTransparency );
-    void SetColorf( const OString& rName, SalColor nColor, double fTransparency );
+    void SetColor( const OString& rName, Color nColor, sal_uInt8 nTransparency );
+    void SetColorf( const OString& rName, Color nColor, double fTransparency );
     void SetColorWithIntensity( const OString& rName, const Color& rColor, long nFactor );
     void SetTexture( const OString& rName, OpenGLTexture& rTexture );
     void SetTransform( const OString& rName, const OpenGLTexture& rTexture,
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index 97f2d3bec9b2..251d176946d7 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -92,14 +92,14 @@ protected:
      */
     OpenGLTexture maOffscreenTex;
 
-    SalColor mnLineColor;
-    SalColor mnFillColor;
+    Color mnLineColor;
+    Color mnFillColor;
 #ifdef DBG_UTIL
     bool mProgramIsSolidColor;
 #endif
     sal_uInt32 mnDrawCount;
     sal_uInt32 mnDrawCountAtFlush;
-    SalColor mProgramSolidColor;
+    Color mProgramSolidColor;
     double mProgramSolidTransparency;
 
     std::unique_ptr<RenderList> mpRenderList;
@@ -113,11 +113,11 @@ protected:
 
 public:
     bool UseProgram( const OUString& rVertexShader, const OUString& rFragmentShader, const OString& preamble = "" );
-    bool UseSolid( SalColor nColor, sal_uInt8 nTransparency );
-    bool UseSolid( SalColor nColor, double fTransparency );
-    bool UseSolid( SalColor nColor );
+    bool UseSolid( Color nColor, sal_uInt8 nTransparency );
+    bool UseSolid( Color nColor, double fTransparency );
+    bool UseSolid( Color nColor );
     void UseSolid();
-    bool UseLine(SalColor nColor, double fTransparency, GLfloat fLineWidth, bool bUseAA);
+    bool UseLine(Color nColor, double fTransparency, GLfloat fLineWidth, bool bUseAA);
     void UseLine(GLfloat fLineWidth, bool bUseAA);
     bool UseInvert50();
     bool UseInvert(SalInvert nFlags);
@@ -138,11 +138,11 @@ public:
     void DrawTextureDiff( OpenGLTexture& rTexture, OpenGLTexture& rMask, const SalTwoRect& rPosAry, bool bInverted );
     void DrawTextureWithMask( OpenGLTexture& rTexture, OpenGLTexture& rMask, const SalTwoRect& rPosAry );
     void DrawBlendedTexture( OpenGLTexture& rTexture, OpenGLTexture& rMask, OpenGLTexture& rAlpha, const SalTwoRect& rPosAry );
-    void DrawMask( OpenGLTexture& rTexture, SalColor nMaskColor, const SalTwoRect& rPosAry );
+    void DrawMask( OpenGLTexture& rTexture, Color nMaskColor, const SalTwoRect& rPosAry );
     void DrawLinearGradient( const Gradient& rGradient, const tools::Rectangle& rRect );
     void DrawAxialGradient( const Gradient& rGradient, const tools::Rectangle& rRect );
     void DrawRadialGradient( const Gradient& rGradient, const tools::Rectangle& rRect );
-    void DeferredTextDraw(OpenGLTexture const & rTexture, const SalColor nMaskColor, const SalTwoRect& rPosAry);
+    void DeferredTextDraw(OpenGLTexture const & rTexture, const Color nMaskColor, const SalTwoRect& rPosAry);
 
     void FlushDeferredDrawing();
     void FlushLinesOrTriangles(DrawShaderType eType, RenderParameters const & rParameters);
@@ -218,14 +218,14 @@ public:
     virtual void SetLineColor() override;
 
     // set the line color to a specific color
-    virtual void SetLineColor( SalColor nSalColor ) override;
+    virtual void SetLineColor( Color nColor ) override;
 
     // set the fill color to transparent (= don't fill)
     virtual void SetFillColor() override;
 
     // set the fill color to a specific color, shapes will be
     // filled accordingly
-    virtual void SetFillColor( SalColor nSalColor ) override;
+    virtual void SetFillColor( Color nColor ) override;
 
     // enable/disable XOR drawing
     virtual void SetXORMode( bool bSet ) override;
@@ -238,7 +238,7 @@ public:
 
     // draw --> LineColor and FillColor and RasterOp and ClipRegion
     virtual void drawPixel( long nX, long nY ) override;
-    virtual void drawPixel( long nX, long nY, SalColor nSalColor ) override;
+    virtual void drawPixel( long nX, long nY, Color nColor ) override;
 
     virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
 
@@ -306,11 +306,11 @@ public:
     virtual void drawMask(
                 const SalTwoRect& rPosAry,
                 const SalBitmap& rSalBitmap,
-                SalColor nMaskColor ) override;
+                Color nMaskColor ) override;
 
     virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
 
-    virtual SalColor getPixel( long nX, long nY ) override;
+    virtual Color getPixel( long nX, long nY ) override;
 
     // invert --> ClipRegion (only Windows or VirDevs)
     virtual void invert(
diff --git a/vcl/inc/outdata.hxx b/vcl/inc/outdata.hxx
index f48f0f991b64..e6aa49175f55 100644
--- a/vcl/inc/outdata.hxx
+++ b/vcl/inc/outdata.hxx
@@ -23,11 +23,6 @@
 #include <tools/color.hxx>
 #include <vcl/salgtype.hxx>
 
-inline SalColor ImplColorToSal( Color aColor )
-{
-    return MAKE_SALCOLOR( aColor.GetRed(), aColor.GetGreen(), aColor.GetBlue() );
-}
-
 inline bool ImplIsColorTransparent( Color aColor )
 {
     return aColor.GetTransparency() != 0;
diff --git a/vcl/inc/quartz/salbmp.h b/vcl/inc/quartz/salbmp.h
index d7c2fb74db51..d2799add6847 100644
--- a/vcl/inc/quartz/salbmp.h
+++ b/vcl/inc/quartz/salbmp.h
@@ -93,7 +93,7 @@ public:
 
 public:
     CGImageRef      CreateWithMask( const QuartzSalBitmap& rMask, int nX, int nY, int nWidth, int nHeight ) const;
-    CGImageRef      CreateColorMask( int nX, int nY, int nWidth, int nHeight, SalColor nMaskColor ) const;
+    CGImageRef      CreateColorMask( int nX, int nY, int nWidth, int nHeight, Color nMaskColor ) const;
     CGImageRef      CreateCroppedImage( int nX, int nY, int nWidth, int nHeight ) const;
 };
 
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 4016fcb4a2cc..071cc0c079f2 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -223,7 +223,7 @@ public:
 
     // draw --> LineColor and FillColor and RasterOp and ClipRegion
     virtual void            drawPixel( long nX, long nY ) override;
-    virtual void            drawPixel( long nX, long nY, SalColor nSalColor ) override;
+    virtual void            drawPixel( long nX, long nY, Color nColor ) override;
     virtual void            drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
     virtual void            drawRect( long nX, long nY, long nWidth, long nHeight ) override;
     virtual void            drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
@@ -255,10 +255,10 @@ public:
                                         const SalBitmap& rTransparentBitmap ) override;
     virtual void            drawMask( const SalTwoRect& rPosAry,
                                       const SalBitmap& rSalBitmap,
-                                      SalColor nMaskColor ) override;
+                                      Color nMaskColor ) override;
 
     virtual SalBitmap*      getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
-    virtual SalColor        getPixel( long nX, long nY ) override;
+    virtual Color           getPixel( long nX, long nY ) override;
 
     // invert --> ClipRegion (only Windows or VirDevs)
     virtual void            invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) override;
@@ -313,12 +313,12 @@ public:
     // set the line color to transparent (= don't draw lines)
     virtual void            SetLineColor() override;
     // set the line color to a specific color
-    virtual void            SetLineColor( SalColor nSalColor ) override;
+    virtual void            SetLineColor( Color nColor ) override;
     // set the fill color to transparent (= don't fill)
     virtual void            SetFillColor() override;
     // set the fill color to a specific color, shapes will be
     // filled accordingly
-    virtual void            SetFillColor( SalColor nSalColor ) override;
+    virtual void            SetFillColor( Color nColor ) override;
     // enable/disable XOR drawing
     virtual void            SetXORMode( bool bSet ) override;
     // set line color for raster operations
@@ -326,7 +326,7 @@ public:
     // set fill color for raster operations
     virtual void            SetROPFillColor( SalROPColor nROPColor ) override;
     // set the text color to a specific color
-    virtual void            SetTextColor( SalColor nSalColor ) override;
+    virtual void            SetTextColor( Color nColor ) override;
     // set the font
     virtual void            SetFont( const FontSelectPattern*, int nFallbackLevel ) override;
     // get the current font's metrics
diff --git a/vcl/inc/quartz/salgdicommon.hxx b/vcl/inc/quartz/salgdicommon.hxx
index c73e07516cf0..d199b3cc95ba 100644
--- a/vcl/inc/quartz/salgdicommon.hxx
+++ b/vcl/inc/quartz/salgdicommon.hxx
@@ -38,7 +38,6 @@ class RGBAColor
 {
 public:
     RGBAColor( ::Color );
-    RGBAColor( SalColor );
     RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ); //NOTUSEDYET
     const CGFloat* AsArray() const { return m_fRGBA; }
     bool IsVisible() const { return m_fRGBA[3] > 0; }
@@ -52,14 +51,6 @@ private:
     CGFloat m_fRGBA[4]; // red, green, blue, alpha
 };
 
-inline RGBAColor::RGBAColor( SalColor nSalColor )
-{
-    m_fRGBA[0] = SALCOLOR_RED(nSalColor) * (1.0/255);
-    m_fRGBA[1] = SALCOLOR_GREEN(nSalColor) * (1.0/255);
-    m_fRGBA[2] = SALCOLOR_BLUE(nSalColor) * (1.0/255);
-    m_fRGBA[3] = 1.0; // opaque
-}
-
 inline RGBAColor::RGBAColor( ::Color nColor )
 {
     m_fRGBA[0] = nColor.GetRed() * (1.0/255);
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 655c3ea17aa1..71ef1eae1c08 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -102,14 +102,14 @@ public:
     virtual void                SetLineColor() = 0;
 
     // set the line color to a specific color
-    virtual void                SetLineColor( SalColor nSalColor ) = 0;
+    virtual void                SetLineColor( Color nColor ) = 0;
 
     // set the fill color to transparent (= don't fill)
     virtual void                SetFillColor() = 0;
 
     // set the fill color to a specific color, shapes will be
     // filled accordingly
-    virtual void                SetFillColor( SalColor nSalColor ) = 0;
+    virtual void                SetFillColor( Color nColor ) = 0;
 
     // enable/disable XOR drawing
     virtual void                SetXORMode( bool bSet ) = 0;
@@ -121,7 +121,7 @@ public:
     virtual void                SetROPFillColor( SalROPColor nROPColor ) = 0;
 
     // set the text color to a specific color
-    virtual void                SetTextColor( SalColor nSalColor ) = 0;
+    virtual void                SetTextColor( Color nColor ) = 0;
 
     // set the font
     virtual void                SetFont( const FontSelectPattern*, int nFallbackLevel ) = 0;
@@ -221,7 +221,7 @@ public:
 
     // draw --> LineColor and FillColor and RasterOp and ClipRegion
     void                        DrawPixel( long nX, long nY, const OutputDevice *pOutDev );
-    void                        DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev );
+    void                        DrawPixel( long nX, long nY, Color nColor, const OutputDevice *pOutDev );
 
     void                        DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev );
 
@@ -304,7 +304,7 @@ public:
     void                        DrawMask(
                                     const SalTwoRect& rPosAry,
                                     const SalBitmap& rSalBitmap,
-                                    SalColor nMaskColor,
+                                    Color nMaskColor,
                                     const OutputDevice *pOutDev );
 
     SalBitmap*                  GetBitmap(
@@ -312,7 +312,7 @@ public:
                                     long nWidth, long nHeight,
                                     const OutputDevice *pOutDev );
 
-    SalColor                    GetPixel(
+    Color                       GetPixel(
                                     long nX, long nY,
                                     const OutputDevice *pOutDev );
 
@@ -445,7 +445,7 @@ protected:
 
     // draw --> LineColor and FillColor and RasterOp and ClipRegion
     virtual void                drawPixel( long nX, long nY ) = 0;
-    virtual void                drawPixel( long nX, long nY, SalColor nSalColor ) = 0;
+    virtual void                drawPixel( long nX, long nY, Color nColor ) = 0;
 
     virtual void                drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0;
 
@@ -507,11 +507,11 @@ protected:
     virtual void                drawMask(
                                     const SalTwoRect& rPosAry,
                                     const SalBitmap& rSalBitmap,
-                                    SalColor nMaskColor ) = 0;
+                                    Color nMaskColor ) = 0;
 
     virtual SalBitmap*          getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0;
 
-    virtual SalColor            getPixel( long nX, long nY ) = 0;
+    virtual Color               getPixel( long nX, long nY ) = 0;
 
     // invert --> ClipRegion (only Windows or VirDevs)
     virtual void                invert(
diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx
index 1771afaeaee8..89c6f4dba61d 100644
--- a/vcl/inc/salgdiimpl.hxx
+++ b/vcl/inc/salgdiimpl.hxx
@@ -24,6 +24,7 @@
 
 #include <rtl/ustring.hxx>
 
+#include <tools/color.hxx>
 #include <tools/poly.hxx>
 #include <tools/solar.h>
 
@@ -68,14 +69,14 @@ public:
     virtual void SetLineColor() = 0;
 
     // set the line color to a specific color
-    virtual void SetLineColor( SalColor nSalColor ) = 0;
+    virtual void SetLineColor( Color nColor ) = 0;
 
     // set the fill color to transparent (= don't fill)
     virtual void SetFillColor() = 0;
 
     // set the fill color to a specific color, shapes will be
     // filled accordingly
-    virtual void SetFillColor( SalColor nSalColor ) = 0;
+    virtual void SetFillColor( Color nColor ) = 0;
 
     // enable/disable XOR drawing
     virtual void SetXORMode( bool bSet ) = 0;
@@ -88,7 +89,7 @@ public:
 
     // draw --> LineColor and FillColor and RasterOp and ClipRegion
     virtual void drawPixel( long nX, long nY ) = 0;
-    virtual void drawPixel( long nX, long nY, SalColor nSalColor ) = 0;
+    virtual void drawPixel( long nX, long nY, Color nColor ) = 0;
 
     virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0;
 
@@ -146,11 +147,11 @@ public:
     virtual void drawMask(
                 const SalTwoRect& rPosAry,
                 const SalBitmap& rSalBitmap,
-                SalColor nMaskColor ) = 0;
+                Color nMaskColor ) = 0;
 
     virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0;
 
-    virtual SalColor getPixel( long nX, long nY ) = 0;
+    virtual Color getPixel( long nX, long nY ) = 0;
 
     // invert --> ClipRegion (only Windows or VirDevs)
     virtual void invert(
diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx
index 3866a54c6b6f..8a33c7b07abe 100644
--- a/vcl/inc/textrender.hxx
+++ b/vcl/inc/textrender.hxx
@@ -34,7 +34,7 @@ class TextRenderImpl
 public:
     virtual ~TextRenderImpl() {}
 
-    virtual void                    SetTextColor( SalColor nSalColor ) = 0;
+    virtual void                    SetTextColor( Color nColor ) = 0;
     virtual void                    SetFont( const FontSelectPattern*, int nFallbackLevel ) = 0;
     virtual void                    GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) = 0;
     virtual const FontCharMapRef    GetFontCharMap() const = 0;
diff --git a/vcl/inc/unx/cairotextrender.hxx b/vcl/inc/unx/cairotextrender.hxx
index 2ee28bdb3837..bdbc201780b4 100644
--- a/vcl/inc/unx/cairotextrender.hxx
+++ b/vcl/inc/unx/cairotextrender.hxx
@@ -34,7 +34,7 @@ class VCL_DLLPUBLIC CairoTextRender : public TextRenderImpl
 {
     FreetypeFont*   mpFreetypeFont[ MAX_FALLBACK ];
 
-    SalColor        mnTextColor;
+    Color           mnTextColor;
 
 protected:
     virtual GlyphCache&         getPlatformGlyphCache() = 0;
@@ -50,7 +50,7 @@ public:
                                 CairoTextRender();
 
 
-    virtual void                SetTextColor( SalColor nSalColor ) override;
+    virtual void                SetTextColor( Color nColor ) override;
     virtual void                SetFont( const FontSelectPattern*, int nFallbackLevel ) override;
     virtual void                GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
     virtual const FontCharMapRef GetFontCharMap() const override;
diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h
index 7c01d57e0786..52ef103aaf7d 100644
--- a/vcl/inc/unx/genpspgraphics.h
+++ b/vcl/inc/unx/genpspgraphics.h
@@ -75,14 +75,14 @@ public:
     virtual bool            setClipRegion( const vcl::Region& ) override;
 
     virtual void            SetLineColor() override;
-    virtual void            SetLineColor( SalColor nSalColor ) override;
+    virtual void            SetLineColor( Color nColor ) override;
     virtual void            SetFillColor() override;
-    virtual void            SetFillColor( SalColor nSalColor ) override;
+    virtual void            SetFillColor( Color nColor ) override;
     virtual void            SetXORMode( bool bSet ) override;
     virtual void            SetROPLineColor( SalROPColor nROPColor ) override;
     virtual void            SetROPFillColor( SalROPColor nROPColor ) override;
 
-    virtual void            SetTextColor( SalColor nSalColor ) override;
+    virtual void            SetTextColor( Color nColor ) override;
     virtual void            SetFont( const FontSelectPattern*, int nFallbackLevel ) override;
     virtual void            GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
     virtual const FontCharMapRef GetFontCharMap() const override;
@@ -118,7 +118,7 @@ public:
     virtual void            DrawTextLayout( const CommonSalLayout& ) override;
     virtual bool            supportsOperation( OutDevSupportType ) const override;
     virtual void            drawPixel( long nX, long nY ) override;
-    virtual void            drawPixel( long nX, long nY, SalColor nSalColor ) override;
+    virtual void            drawPixel( long nX, long nY, Color nColor ) override;
     virtual void            drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
     virtual void            drawRect( long nX, long nY, long nWidth, long nHeight ) override;
     virtual void            drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
@@ -162,9 +162,9 @@ public:
                                         const SalBitmap& rTransparentBitmap ) override;
     virtual void            drawMask( const SalTwoRect& rPosAry,
                                       const SalBitmap& rSalBitmap,
-                                      SalColor nMaskColor ) override;
+                                      Color nMaskColor ) override;
     virtual SalBitmap*      getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
-    virtual SalColor        getPixel( long nX, long nY ) override;
+    virtual Color           getPixel( long nX, long nY ) override;
     virtual void            invert( long nX, long nY, long nWidth, long nHeight,
                                     SalInvert nFlags ) override;
     virtual void            invert( sal_uInt32 nPoints, const SalPoint* pPtAry,
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 259af28e63a8..48756f3cbfe1 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -68,7 +68,7 @@ typedef enum  {
 
 extern "C" srv_vendor_t sal_GetServerVendor( Display *p_display );
 
-// MSB/Bigendian view (SalColor == RGB, r=0xFF0000, g=0xFF00, b=0xFF)
+// MSB/Bigendian view (Color == RGB, r=0xFF0000, g=0xFF00, b=0xFF)
 
 enum SalRGB { RGB,  RBG,
               GBR,  GRB,
@@ -97,15 +97,15 @@ public:
     int             GetClass() const { return c_class; }
     int             GetDepth() const { return depth; }
 
-            Pixel           GetTCPixel( SalColor nColor ) const;
-            SalColor        GetTCColor( Pixel nPixel ) const;
+            Pixel           GetTCPixel( Color nColor ) const;
+            Color           GetTCColor( Pixel nPixel ) const;
 };
 
 class SalColormap
 {
     const SalDisplay*       m_pDisplay;
     Colormap                m_hColormap;
-    std::vector<SalColor>   m_aPalette;         // Pseudocolor
+    std::vector<Color>      m_aPalette;         // Pseudocolor
     SalVisual               m_aVisual;
     std::vector<sal_uInt16>     m_aLookupTable;     // Pseudocolor: 12bit reduction
     Pixel                   m_nWhitePixel;
@@ -139,8 +139,8 @@ public:
                                            int      r,
                                            int      g,
                                            int      b ) const;
-    Pixel           GetPixel( SalColor nColor ) const;
-    SalColor        GetColor( Pixel nPixel ) const;
+    Pixel           GetPixel( Color nColor ) const;
+    Color           GetColor( Pixel nPixel ) const;
 };
 
 class SalI18N_InputMethod;
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 887039b6b1d3..dded647ab97d 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -91,7 +91,7 @@ public:
     const SalColormap&      GetColormap() const { return *m_pColormap; }
 
     using SalGraphics::GetPixel;
-    inline  Pixel                   GetPixel( SalColor nSalColor ) const;
+    inline  Pixel                   GetPixel( Color nColor ) const;
 
     const SalX11Screen&             GetScreenNumber() const { return m_nXScreen; }
 
@@ -104,17 +104,17 @@ public:
     virtual bool                    setClipRegion( const vcl::Region& ) override;
 
     virtual void                    SetLineColor() override;
-    virtual void                    SetLineColor( SalColor nSalColor ) override;
+    virtual void                    SetLineColor( Color nColor ) override;
     virtual void                    SetFillColor() override;
 
-    virtual void                    SetFillColor( SalColor nSalColor ) override;
+    virtual void                    SetFillColor( Color nColor ) override;
 
     virtual void                    SetXORMode( bool bSet ) override;
 
     virtual void                    SetROPLineColor( SalROPColor nROPColor ) override;
     virtual void                    SetROPFillColor( SalROPColor nROPColor ) override;
 
-    virtual void                    SetTextColor( SalColor nSalColor ) override;
+    virtual void                    SetTextColor( Color nColor ) override;
     virtual void                    SetFont( const FontSelectPattern*, int nFallbackLevel ) override;
     virtual void                    GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
     virtual const FontCharMapRef    GetFontCharMap() const override;
@@ -149,7 +149,7 @@ public:
 
     virtual bool                    supportsOperation( OutDevSupportType ) const override;
     virtual void                    drawPixel( long nX, long nY ) override;
-    virtual void                    drawPixel( long nX, long nY, SalColor nSalColor ) override;
+    virtual void                    drawPixel( long nX, long nY, Color nColor ) override;
     virtual void                    drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
     virtual void                    drawRect( long nX, long nY, long nWidth, long nHeight ) override;
     virtual void                    drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
@@ -215,10 +215,10 @@ public:
     virtual void                    drawMask(
                                         const SalTwoRect& rPosAry,
                                         const SalBitmap& rSalBitmap,
-                                        SalColor nMaskColor ) override;
+                                        Color nMaskColor ) override;
 
     virtual SalBitmap*              getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
-    virtual SalColor                getPixel( long nX, long nY ) override;
+    virtual Color                   getPixel( long nX, long nY ) override;
     virtual void                    invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ) override;
     virtual void                    invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) override;
 
@@ -305,7 +305,7 @@ public:
 protected:
     using SalGraphics::SetClipRegion;
     void                            SetClipRegion( GC pGC, Region pXReg = nullptr ) const;
-    bool                            GetDitherPixmap ( SalColor nSalColor );
+    bool                            GetDitherPixmap ( Color nColor );
 
     using SalGraphics::DrawBitmap;
 
@@ -327,8 +327,8 @@ protected:
     Region                          mpClipRegion;
 #if ENABLE_CAIRO_CANVAS
     vcl::Region                     maClipRegion;
-    SalColor                        mnPenColor;
-    SalColor                        mnFillColor;
+    Color                           mnPenColor;
+    Color                           mnFillColor;
 #endif // ENABLE_CAIRO_CANVAS
 
     GC                              pFontGC_;       // Font attributes
@@ -356,8 +356,8 @@ inline const SalVisual& X11SalGraphics::GetVisual() const
 inline Display *X11SalGraphics::GetXDisplay() const
 { return GetColormap().GetXDisplay(); }
 
-inline Pixel X11SalGraphics::GetPixel( SalColor nSalColor ) const
-{ return GetColormap().GetPixel( nSalColor ); }
+inline Pixel X11SalGraphics::GetPixel( Color nColor ) const
+{ return GetColormap().GetPixel( nColor ); }
 
 #endif // INCLUDED_VCL_INC_UNX_SALGDI_H
 
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 2431b388c67b..b1edef997d85 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -224,7 +224,7 @@ protected:
     virtual bool        setClipRegion( const vcl::Region& ) override;
     // draw --> LineColor and FillColor and RasterOp and ClipRegion
     virtual void        drawPixel( long nX, long nY ) override;
-    virtual void        drawPixel( long nX, long nY, SalColor nSalColor ) override;
+    virtual void        drawPixel( long nX, long nY, Color nColor ) override;
     virtual void        drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
     virtual void        drawRect( long nX, long nY, long nWidth, long nHeight ) override;
     virtual void        drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
@@ -256,10 +256,10 @@ protected:
                                     const SalBitmap& rTransparentBitmap ) override;
     virtual void        drawMask( const SalTwoRect& rPosAry,
                                   const SalBitmap& rSalBitmap,
-                                  SalColor nMaskColor ) override;
+                                  Color nMaskColor ) override;
 
     virtual SalBitmap*  getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
-    virtual SalColor    getPixel( long nX, long nY ) override;
+    virtual Color       getPixel( long nX, long nY ) override;
 
     // invert --> ClipRegion (only Windows or VirDevs)
     virtual void        invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) override;
@@ -317,12 +317,12 @@ public:
     // set the line color to transparent (= don't draw lines)
     virtual void            SetLineColor() override;
     // set the line color to a specific color
-    virtual void            SetLineColor( SalColor nSalColor ) override;
+    virtual void            SetLineColor( Color nColor ) override;
     // set the fill color to transparent (= don't fill)
     virtual void            SetFillColor() override;
     // set the fill color to a specific color, shapes will be
     // filled accordingly
-    virtual void            SetFillColor( SalColor nSalColor ) override;
+    virtual void            SetFillColor( Color nColor ) override;
     // enable/disable XOR drawing
     virtual void            SetXORMode( bool bSet ) override;
     // set line color for raster operations
@@ -330,7 +330,7 @@ public:
     // set fill color for raster operations
     virtual void            SetROPFillColor( SalROPColor nROPColor ) override;
     // set the text color to a specific color
-    virtual void            SetTextColor( SalColor nSalColor ) override;
+    virtual void            SetTextColor( Color nColor ) override;
     // set the font
     virtual void            SetFont( const FontSelectPattern*, int nFallbackLevel ) override;
     // get the current font's metrics
@@ -396,7 +396,7 @@ public:
 
 // Init/Deinit Graphics
 void    ImplUpdateSysColorEntries();
-int     ImplIsSysColorEntry( SalColor nSalColor );
+int     ImplIsSysColorEntry( Color nColor );
 void    ImplGetLogFontFromFontSelect( HDC, const FontSelectPattern*,
             LOGFONTW&, bool bTestVerticalAvail );
 
diff --git a/vcl/opengl/LineRenderUtils.cxx b/vcl/opengl/LineRenderUtils.cxx
index 35f95c4b2da9..6ba78048b9e0 100644
--- a/vcl/opengl/LineRenderUtils.cxx
+++ b/vcl/opengl/LineRenderUtils.cxx
@@ -14,13 +14,13 @@ namespace vcl
 {
 
 LineBuilder::LineBuilder(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndices,
-                SalColor nColor, GLfloat fTransparency,
+                Color nColor, GLfloat fTransparency,
                 GLfloat fLineWidth, bool bUseAA)
     : mrVertices(rVertices)
     , mrIndices(rIndices)
-    , mR(SALCOLOR_RED(nColor))
-    , mG(SALCOLOR_GREEN(nColor))
-    , mB(SALCOLOR_BLUE(nColor))
+    , mR(nColor.GetRed())
+    , mG(nColor.GetGreen())
+    , mB(nColor.GetBlue())
     , mA((1.0f - fTransparency) * 255.0f)
     , mfLineWidth(fLineWidth)
     , mfLineWidthAndAA(bUseAA ? fLineWidth : -fLineWidth)
diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx
index 9a9924768a5a..927de11525b9 100644
--- a/vcl/opengl/RenderList.cxx
+++ b/vcl/opengl/RenderList.cxx
@@ -151,7 +151,7 @@ void appendPolyLine(vcl::LineBuilder& rBuilder, const basegfx::B2DPolygon& rPoly
 inline void appendTrapezoid(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndices,
                        GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2,
                        GLfloat x3, GLfloat y3, GLfloat x4, GLfloat y4,
-                       SalColor nColor, GLfloat fTransparency)
+                       Color nColor, GLfloat fTransparency)
 {
     GLubyte nR, nG, nB, nA;
     vcl::vertex::createColor(nColor, fTransparency, nR, nG, nB, nA);
@@ -173,7 +173,7 @@ inline void appendTrapezoid(std::vector<Vertex>& rVertices, std::vector<GLuint>&
 
 void appendRectangle(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndices,
                      GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2,
-                     SalColor nColor, GLfloat fTransparency)
+                     Color nColor, GLfloat fTransparency)
 {
     GLubyte nR, nG, nB, nA;
     vcl::vertex::createColor(nColor, fTransparency, nR, nG, nB, nA);
@@ -195,7 +195,7 @@ void appendRectangle(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndic
 
 } // end anonymous namespace
 
-void RenderList::addDrawPixel(long nX, long nY, SalColor nColor)
+void RenderList::addDrawPixel(long nX, long nY, Color nColor)
 {
     if (nColor == SALCOLOR_NONE)
         return;
@@ -208,7 +208,7 @@ void RenderList::addDrawPixel(long nX, long nY, SalColor nColor)
 }
 
 void RenderList::addDrawRectangle(long nX, long nY, long nWidth, long nHeight, double fTransparency,
-                                  SalColor nLineColor, SalColor nFillColor)
+                                  Color nLineColor, Color nFillColor)
 {
     if (nLineColor == SALCOLOR_NONE && nFillColor == SALCOLOR_NONE)
         return;
@@ -256,7 +256,7 @@ void RenderList::addDrawRectangle(long nX, long nY, long nWidth, long nHeight, d
     }
 }
 
-void RenderList::addDrawLine(long nX1, long nY1, long nX2, long nY2, SalColor nLineColor, bool bUseAA)
+void RenderList::addDrawLine(long nX1, long nY1, long nX2, long nY2, Color nLineColor, bool bUseAA)
 {
     if (nLineColor == SALCOLOR_NONE)
         return;
@@ -273,7 +273,7 @@ void RenderList::addDrawLine(long nX1, long nY1, long nX2, long nY2, SalColor nL
 }
 
 void RenderList::addDrawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, double fTransparency,
-                        SalColor nLineColor, SalColor nFillColor, bool bUseAA)
+                        Color nLineColor, Color nFillColor, bool bUseAA)
 {
     if (rPolyPolygon.count() <= 0)
         return;
@@ -314,7 +314,7 @@ void RenderList::addDrawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon,
 
     if (nLineColor != SALCOLOR_NONE || bUseAA)
     {
-        SalColor nColor = (nLineColor == SALCOLOR_NONE) ? nFillColor : nLineColor;
+        Color nColor = (nLineColor == SALCOLOR_NONE) ? nFillColor : nLineColor;
 
         vcl::LineBuilder aBuilder(rLineRenderParameter.maVertices, rLineRenderParameter.maIndices,
                                   nColor, fTransparency, 1.0f, bUseAA);
@@ -348,7 +348,7 @@ void RenderList::addDrawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon,
     }
 }
 
-void RenderList::addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, SalColor nColor, const SalTwoRect& r2Rect)
+void RenderList::addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, Color nColor, const SalTwoRect& r2Rect)
 {
     if (!rTexture)
         return;
@@ -374,7 +374,7 @@ void RenderList::addDrawTextureWithMaskColor(OpenGLTexture const & rTexture, Sal
 void RenderList::addDrawPolyLine(const basegfx::B2DPolygon& rPolygon, double fTransparency,
                                  const basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin eLineJoin,
                                  css::drawing::LineCap eLineCap, double fMiterMinimumAngle,
-                                 SalColor nLineColor, bool bUseAA)
+                                 Color nLineColor, bool bUseAA)
 {
     if (rPolygon.count() <= 1)
         return;
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 7d0be09a1b12..df4996a6ca09 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -325,7 +325,7 @@ void OpenGLSalGraphicsImpl::ImplSetClipBit( const vcl::Region& rClip, GLuint nMa
 
     glClear( GL_STENCIL_BUFFER_BIT );
     CHECK_GL_ERROR();
-    if( UseSolid( MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) ) )
+    if( UseSolid( Color( 0xFF, 0xFF, 0xFF ) ) )
     {
         if( rClip.getRegionBand() )
             DrawRegionBand( *rClip.getRegionBand() );
@@ -445,11 +445,11 @@ void OpenGLSalGraphicsImpl::SetLineColor()
 }
 
 // set the line color to a specific color
-void OpenGLSalGraphicsImpl::SetLineColor( SalColor nSalColor )
+void OpenGLSalGraphicsImpl::SetLineColor( Color nColor )
 {
-    if( mnLineColor != nSalColor )
+    if( mnLineColor != nColor )
     {
-        mnLineColor = nSalColor;
+        mnLineColor = nColor;
     }
 }
 
@@ -464,11 +464,11 @@ void OpenGLSalGraphicsImpl::SetFillColor()
 
 // set the fill color to a specific color, shapes will be
 // filled accordingly
-void OpenGLSalGraphicsImpl::SetFillColor( SalColor nSalColor )
+void OpenGLSalGraphicsImpl::SetFillColor( Color nColor )
 {
-    if( mnFillColor != nSalColor )
+    if( mnFillColor != nColor )
     {
-        mnFillColor = nSalColor;
+        mnFillColor = nColor;
     }
 }
 
@@ -487,13 +487,13 @@ void OpenGLSalGraphicsImpl::SetROPLineColor(SalROPColor nROPColor)
     switch (nROPColor)
     {
         case SalROPColor::N0:
-            mnLineColor = MAKE_SALCOLOR(0, 0, 0);
+            mnLineColor = Color(0, 0, 0);
             break;
         case SalROPColor::N1:
-            mnLineColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
+            mnLineColor = Color(0xff, 0xff, 0xff);
             break;
         case SalROPColor::Invert:
-            mnLineColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
+            mnLineColor = Color(0xff, 0xff, 0xff);
             break;
     }
 }
@@ -503,13 +503,13 @@ void OpenGLSalGraphicsImpl::SetROPFillColor(SalROPColor nROPColor)
     switch (nROPColor)
     {
         case SalROPColor::N0:
-            mnFillColor = MAKE_SALCOLOR(0, 0, 0);
+            mnFillColor = Color(0, 0, 0);
             break;
         case SalROPColor::N1:
-            mnFillColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
+            mnFillColor = Color(0xff, 0xff, 0xff);
             break;
         case SalROPColor::Invert:
-            mnFillColor = MAKE_SALCOLOR(0xff, 0xff, 0xff);
+            mnFillColor = Color(0xff, 0xff, 0xff);
             break;
     }
 }
@@ -591,7 +591,7 @@ bool OpenGLSalGraphicsImpl::UseProgram( const OUString& rVertexShader, const OUS
     return ( mpProgram != nullptr );
 }
 
-bool OpenGLSalGraphicsImpl::UseSolid( SalColor nColor, sal_uInt8 nTransparency )
+bool OpenGLSalGraphicsImpl::UseSolid( Color nColor, sal_uInt8 nTransparency )
 {
     if( nColor == SALCOLOR_NONE )
         return false;
@@ -606,7 +606,7 @@ bool OpenGLSalGraphicsImpl::UseSolid( SalColor nColor, sal_uInt8 nTransparency )
     return true;
 }
 
-bool OpenGLSalGraphicsImpl::UseSolid( SalColor nColor, double fTransparency )
+bool OpenGLSalGraphicsImpl::UseSolid( Color nColor, double fTransparency )
 {
     if( nColor == SALCOLOR_NONE )
         return false;
@@ -632,7 +632,7 @@ bool OpenGLSalGraphicsImpl::UseInvert50()
     return UseProgram( "dumbVertexShader", "invert50FragmentShader" );
 }
 
-bool OpenGLSalGraphicsImpl::UseSolid( SalColor nColor )
+bool OpenGLSalGraphicsImpl::UseSolid( Color nColor )
 {
     return UseSolid( nColor, 0.0f );
 }
@@ -652,7 +652,7 @@ bool OpenGLSalGraphicsImpl::UseInvert( SalInvert nFlags )
     }
     else
     {
-        if( !UseSolid( MAKE_SALCOLOR( 255, 255, 255 ) ) )
+        if( !UseSolid( Color( 255, 255, 255 ) ) )
             return false;
         mpProgram->SetBlendMode( GL_ONE_MINUS_DST_COLOR, GL_ZERO );
     }
@@ -683,7 +683,7 @@ void OpenGLSalGraphicsImpl::DrawLineSegment(float x1, float y1, float x2, float
     CHECK_GL_ERROR();
 }
 
-bool OpenGLSalGraphicsImpl::UseLine(SalColor nColor, double fTransparency, GLfloat fLineWidth, bool bUseAA)
+bool OpenGLSalGraphicsImpl::UseLine(Color nColor, double fTransparency, GLfloat fLineWidth, bool bUseAA)
 {
     if( nColor == SALCOLOR_NONE )
         return false;
@@ -738,7 +738,7 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( sal_uInt32 nPoints, const SalPoin
 #ifdef DBG_UTIL
         assert( mProgramIsSolidColor );
 #endif
-        SalColor lastSolidColor = mProgramSolidColor;
+        Color lastSolidColor = mProgramSolidColor;
         double lastSolidTransparency = mProgramSolidTransparency;
         if (UseLine(lastSolidColor, lastSolidTransparency, 1.0f, true))
         {
@@ -783,7 +783,7 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( const tools::Polygon& rPolygon, b
 #ifdef DBG_UTIL
         assert( mProgramIsSolidColor );
 #endif
-        SalColor lastSolidColor = mProgramSolidColor;
+        Color lastSolidColor = mProgramSolidColor;
         double lastSolidTransparency = mProgramSolidTransparency;
         if (UseLine(lastSolidColor, lastSolidTransparency, 1.0f, true))
         {
@@ -835,7 +835,7 @@ void OpenGLSalGraphicsImpl::DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoi
 #ifdef DBG_UTIL
         assert( mProgramIsSolidColor );
 #endif
-        SalColor lastSolidColor = mProgramSolidColor;
+        Color lastSolidColor = mProgramSolidColor;
         double lastSolidTransparency = mProgramSolidTransparency;
         if (UseLine(lastSolidColor, lastSolidTransparency, 1.0f, true))
         {
@@ -1291,7 +1291,7 @@ void OpenGLSalGraphicsImpl::DrawBlendedTexture( OpenGLTexture& rTexture, OpenGLT
     mpProgram->Clean();
 }
 
-void OpenGLSalGraphicsImpl::DrawMask( OpenGLTexture& rMask, SalColor nMaskColor, const SalTwoRect& rPosAry )
+void OpenGLSalGraphicsImpl::DrawMask( OpenGLTexture& rMask, Color nMaskColor, const SalTwoRect& rPosAry )
 {
     OpenGLZone aZone;
 
@@ -1313,7 +1313,7 @@ void OpenGLSalGraphicsImpl::DrawMask( OpenGLTexture& rMask, SalColor nMaskColor,
     mpProgram->Clean();
 }
 
-void OpenGLSalGraphicsImpl::DeferredTextDraw(OpenGLTexture const & rTexture, SalColor aMaskColor, const SalTwoRect& rPosAry)
+void OpenGLSalGraphicsImpl::DeferredTextDraw(OpenGLTexture const & rTexture, Color aMaskColor, const SalTwoRect& rPosAry)
 {
     mpRenderList->addDrawTextureWithMaskColor(rTexture, aMaskColor, rPosAry);
     PostBatchDraw();
@@ -1519,10 +1519,10 @@ void OpenGLSalGraphicsImpl::drawPixel(long nX, long nY)
     PostBatchDraw();
 }
 
-void OpenGLSalGraphicsImpl::drawPixel(long nX, long nY, SalColor nSalColor)
+void OpenGLSalGraphicsImpl::drawPixel(long nX, long nY, Color nColor)
 {
     VCL_GL_INFO("::drawPixel: (" << nX << ", " << nY << ")");
-    mpRenderList->addDrawPixel(nX, nY, nSalColor);
+    mpRenderList->addDrawPixel(nX, nY, nColor);
     PostBatchDraw();
 }
 
@@ -1711,7 +1711,7 @@ void OpenGLSalGraphicsImpl::drawBitmap(
 void OpenGLSalGraphicsImpl::drawMask(
             const SalTwoRect& rPosAry,
             const SalBitmap& rSalBitmap,
-            SalColor nMaskColor )
+            Color nMaskColor )
 {
     VCL_GL_INFO("::drawMask");
 
@@ -1741,7 +1741,7 @@ SalBitmap* OpenGLSalGraphicsImpl::getBitmap( long nX, long nY, long nWidth, long
     return pBitmap;
 }
 
-SalColor OpenGLSalGraphicsImpl::getPixel( long nX, long nY )
+Color OpenGLSalGraphicsImpl::getPixel( long nX, long nY )
 {
     FlushDeferredDrawing();
 
@@ -1753,7 +1753,7 @@ SalColor OpenGLSalGraphicsImpl::getPixel( long nX, long nY )
     CHECK_GL_ERROR();
     PostDraw();
 
-    return MAKE_SALCOLOR( pixel[0], pixel[1], pixel[2] );
+    return Color( pixel[0], pixel[1], pixel[2] );
 }
 
 // invert --> ClipRegion (only Windows or VirDevs)
@@ -2007,7 +2007,7 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
 
         Color aColor = rGradient.GetStartColor();
         long nIntensity = rGradient.GetStartIntensity();
-        if (UseSolid(MAKE_SALCOLOR(aColor.GetRed()  * nIntensity / 100.0,
+        if (UseSolid(Color(aColor.GetRed()  * nIntensity / 100.0,
                                    aColor.GetGreen()* nIntensity / 100.0,
                                    aColor.GetBlue() * nIntensity / 100.0)))
         {
diff --git a/vcl/opengl/program.cxx b/vcl/opengl/program.cxx
index ba5c2523344d..09a8a0d98d0b 100644
--- a/vcl/opengl/program.cxx
+++ b/vcl/opengl/program.cxx
@@ -233,13 +233,13 @@ void OpenGLProgram::SetUniform1i( const OString& rName, GLint v1 )
     CHECK_GL_ERROR();
 }
 
-void OpenGLProgram::SetColor( const OString& rName, SalColor nColor, sal_uInt8 nTransparency )
+void OpenGLProgram::SetColor( const OString& rName, Color nColor, sal_uInt8 nTransparency )
 {
     GLuint nUniform = GetUniformLocation( rName );
     glUniform4f( nUniform,
-                 static_cast<float>(SALCOLOR_RED( nColor )) / 255,
-                 static_cast<float>(SALCOLOR_GREEN( nColor )) / 255,
-                 static_cast<float>(SALCOLOR_BLUE( nColor )) / 255,
+                 nColor.GetRed() / 255.0f,
+                 nColor.GetGreen() / 255.0f,
+                 nColor.GetBlue() / 255.0f,
                  (100 - nTransparency) * (1.0 / 100) );
     CHECK_GL_ERROR();
 
@@ -247,13 +247,13 @@ void OpenGLProgram::SetColor( const OString& rName, SalColor nColor, sal_uInt8 n
         SetBlendMode( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
 }
 
-void OpenGLProgram::SetColorf( const OString& rName, SalColor nColor, double fTransparency )
+void OpenGLProgram::SetColorf( const OString& rName, Color nColor, double fTransparency )
 {
     GLuint nUniform = GetUniformLocation( rName );
     glUniform4f( nUniform,
-                 static_cast<float>(SALCOLOR_RED( nColor )) / 255,
-                 static_cast<float>(SALCOLOR_GREEN( nColor )) / 255,
-                 static_cast<float>(SALCOLOR_BLUE( nColor )) / 255,
+                 nColor.GetRed() / 255.0f,
+                 nColor.GetGreen() / 255.0f,
+                 nColor.GetBlue() / 255.0f,
                  (1.0f - fTransparency) );
     CHECK_GL_ERROR();
 
diff --git a/vcl/osx/a11ytextattributeswrapper.mm b/vcl/osx/a11ytextattributeswrapper.mm
index 1af27ad4f247..f57aaac2680a 100644
--- a/vcl/osx/a11ytextattributeswrapper.mm
+++ b/vcl/osx/a11ytextattributeswrapper.mm
@@ -167,10 +167,10 @@ using namespace ::com::sun::star::uno;
     return [ NSNumber numberWithShort: value ];
 }
 
-+(void)addColor:(SalColor)nSalColor forAttribute:(NSString *)attribute andRange:(NSRange)range toString:(NSMutableAttributedString *)string {
-    if( nSalColor == sal_uInt32(COL_TRANSPARENT) )
++(void)addColor:(Color)nColor forAttribute:(NSString *)attribute andRange:(NSRange)range toString:(NSMutableAttributedString *)string {
+    if( nColor == COL_TRANSPARENT )
         return;
-    const RGBAColor aRGBAColor( nSalColor);
+    const RGBAColor aRGBAColor( nColor);
     CGColorRef aColorRef = CGColorCreate ( CGColorSpaceCreateWithName ( kCGColorSpaceGenericRGB ), aRGBAColor.AsArray() );
     [ string addAttribute: attribute value: reinterpret_cast<id>(aColorRef) range: range ];
     CGColorRelease( aColorRef );
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 891281614cb1..62a724a8bfae 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -1032,7 +1032,7 @@ CGImageRef CreateCGImage( const Image& rImage )
     else if( aBmpEx.GetTransparentType() == TransparentType::Color )
     {
         Color aTransColor( aBmpEx.GetTransparentColor() );
-        SalColor nTransColor = MAKE_SALCOLOR( aTransColor.GetRed(), aTransColor.GetGreen(), aTransColor.GetBlue() );
+        Color nTransColor( aTransColor.GetRed(), aTransColor.GetGreen(), aTransColor.GetBlue() );
         xImage = pSalBmp->CreateColorMask( 0, 0, pSalBmp->mnWidth, pSalBmp->mnHeight, nTransColor );
     }
 
diff --git a/vcl/qt5/Qt5Graphics.cxx b/vcl/qt5/Qt5Graphics.cxx
index 23249c5799c6..6ec6c341913a 100644
--- a/vcl/qt5/Qt5Graphics.cxx
+++ b/vcl/qt5/Qt5Graphics.cxx
@@ -33,13 +33,13 @@
 Qt5Graphics::Qt5Graphics( Qt5Frame *pFrame, QImage *pQImage )
     : m_pFrame( pFrame )
     , m_pQImage( pQImage )
-    , m_aLineColor( MAKE_SALCOLOR(0x00, 0x00, 0x00) )
-    , m_aFillColor( MAKE_SALCOLOR(0xFF, 0xFF, 0XFF) )
+    , m_aLineColor( 0x00, 0x00, 0x00 )
+    , m_aFillColor( 0xFF, 0xFF, 0XFF )
     , m_eCompositionMode( QPainter::CompositionMode_SourceOver )
     , m_pFontCollection( nullptr )
     , m_pFontData{ nullptr, }
     , m_pTextStyle{ nullptr, }
-    , m_aTextColor( MAKE_SALCOLOR(0x00, 0x00, 0x00) )
+    , m_aTextColor( 0x00, 0x00, 0x00 )
 {
     ResetClipRegion();
 }
diff --git a/vcl/qt5/Qt5Graphics.hxx b/vcl/qt5/Qt5Graphics.hxx
index a9a71c64b5e2..0ece5ec5f036 100644
--- a/vcl/qt5/Qt5Graphics.hxx
+++ b/vcl/qt5/Qt5Graphics.hxx
@@ -43,14 +43,14 @@ class Qt5Graphics : public SalGraphics
     QImage* m_pQImage;
     QRegion m_aClipRegion;
     QPainterPath m_aClipPath;
-    SalColor m_aLineColor;
-    SalColor m_aFillColor;
+    Color m_aLineColor;
+    Color m_aFillColor;
     QPainter::CompositionMode m_eCompositionMode;
 
     PhysicalFontCollection* m_pFontCollection;
     const Qt5FontFace* m_pFontData[MAX_FALLBACK];
     std::unique_ptr<Qt5Font> m_pTextStyle[MAX_FALLBACK];
-    SalColor m_aTextColor;
+    Color m_aTextColor;
 
     Qt5Graphics(Qt5Frame* pFrame, QImage* pQImage);
 
@@ -91,7 +91,7 @@ public:
     virtual void ResetClipRegion() override;
 
     virtual void drawPixel(long nX, long nY) override;
-    virtual void drawPixel(long nX, long nY, SalColor nSalColor) override;
+    virtual void drawPixel(long nX, long nY, Color nColor) override;
     virtual void drawLine(long nX1, long nY1, long nX2, long nY2) override;
     virtual void drawRect(long nX, long nY, long nWidth, long nHeight) override;
     virtual void drawPolyLine(sal_uInt32 nPoints, const SalPoint* pPtAry) override;
@@ -119,10 +119,10 @@ public:
     virtual void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
                             const SalBitmap& rTransparentBitmap) override;
     virtual void drawMask(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
-                          SalColor nMaskColor) override;
+                          Color nMaskColor) override;
 
     virtual SalBitmap* getBitmap(long nX, long nY, long nWidth, long nHeight) override;
-    virtual SalColor getPixel(long nX, long nY) override;
+    virtual Color getPixel(long nX, long nY) override;
 
     virtual void invert(long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) override;
     virtual void invert(sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags) override;
@@ -151,16 +151,16 @@ public:
     virtual long GetGraphicsWidth() const override;
 
     virtual void SetLineColor() override;
-    virtual void SetLineColor(SalColor nSalColor) override;
+    virtual void SetLineColor(Color nColor) override;
     virtual void SetFillColor() override;
-    virtual void SetFillColor(SalColor nSalColor) override;
+    virtual void SetFillColor(Color nColor) override;
     virtual void SetXORMode(bool bSet) override;
     virtual void SetROPLineColor(SalROPColor nROPColor) override;
     virtual void SetROPFillColor(SalROPColor nROPColor) override;
 
     // Text rendering + font support
 
-    virtual void SetTextColor(SalColor nSalColor) override;
+    virtual void SetTextColor(Color nColor) override;
     virtual void SetFont(const FontSelectPattern*, int nFallbackLevel) override;
     virtual void GetFontMetric(ImplFontMetricDataRef&, int nFallbackLevel) override;
     virtual const FontCharMapRef GetFontCharMap() const override;
diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx
index fe1b98112b33..7bed0a43aed6 100644
--- a/vcl/qt5/Qt5Graphics_GDI.cxx
+++ b/vcl/qt5/Qt5Graphics_GDI.cxx
@@ -169,10 +169,10 @@ void Qt5Graphics::drawPixel(long nX, long nY)
     aPainter.update(nX, nY, 1, 1);
 }
 
-void Qt5Graphics::drawPixel(long nX, long nY, SalColor nSalColor)
+void Qt5Graphics::drawPixel(long nX, long nY, Color nColor)
 {
     Qt5Painter aPainter(*this);
-    aPainter.setPen(QColor(QRgb(nSalColor)));
+    aPainter.setPen(QColor(QRgb(nColor)));
     aPainter.setPen(Qt::SolidLine);
     aPainter.drawPoint(nX, nY);
     aPainter.update(nX, nY, 1, 1);
@@ -425,7 +425,7 @@ void Qt5Graphics::drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& /*rSalB
 }
 
 void Qt5Graphics::drawMask(const SalTwoRect& rPosAry, const SalBitmap& /*rSalBitmap*/,
-                           SalColor /*nMaskColor*/)
+                           Color /*nMaskColor*/)
 {
     if (rPosAry.mnSrcWidth <= 0 || rPosAry.mnSrcHeight <= 0 || rPosAry.mnDestWidth <= 0
         || rPosAry.mnDestHeight <= 0)
@@ -440,7 +440,7 @@ SalBitmap* Qt5Graphics::getBitmap(long nX, long nY, long nWidth, long nHeight)
     return new Qt5Bitmap(m_pQImage->copy(nX, nY, nWidth, nHeight));
 }
 
-SalColor Qt5Graphics::getPixel(long nX, long nY) { return m_pQImage->pixel(nX, nY); }
+Color Qt5Graphics::getPixel(long nX, long nY) { return m_pQImage->pixel(nX, nY); }
 
 void Qt5Graphics::invert(long /*nX*/, long /*nY*/, long /*nWidth*/, long /*nHeight*/,
                          SalInvert /*nFlags*/)
@@ -586,11 +586,11 @@ long Qt5Graphics::GetGraphicsWidth() const { return m_pQImage->width(); }
 
 void Qt5Graphics::SetLineColor() { m_aLineColor = SALCOLOR_NONE; }
 
-void Qt5Graphics::SetLineColor(SalColor nSalColor) { m_aLineColor = nSalColor; }
+void Qt5Graphics::SetLineColor(Color nColor) { m_aLineColor = nColor; }
 
 void Qt5Graphics::SetFillColor() { m_aFillColor = SALCOLOR_NONE; }
 
-void Qt5Graphics::SetFillColor(SalColor nSalColor) { m_aFillColor = nSalColor; }
+void Qt5Graphics::SetFillColor(Color nColor) { m_aFillColor = nColor; }
 
 void Qt5Graphics::SetXORMode(bool bSet)
 {
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index 8d25e97df786..2dbeaecfdf2c 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -30,7 +30,7 @@
 #include <QtGui/QRawFont>
 #include <QtCore/QStringList>
 
-void Qt5Graphics::SetTextColor(SalColor nSalColor) { m_aTextColor = nSalColor; }
+void Qt5Graphics::SetTextColor(Color nColor) { m_aTextColor = nColor; }
 
 void Qt5Graphics::SetFont(const FontSelectPattern* pReqFont, int nFallbackLevel)
 {
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index aba40b44d8e0..5333eca2b961 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -907,7 +907,7 @@ CGImageRef QuartzSalBitmap::CreateWithMask( const QuartzSalBitmap& rMask,
 /** creates an image from the given rectangle, replacing all black pixels
     with nMaskColor and make all other full transparent */
 CGImageRef QuartzSalBitmap::CreateColorMask( int nX, int nY, int nWidth,
-                                             int nHeight, SalColor nMaskColor ) const
+                                             int nHeight, Color nMaskColor ) const
 {
     CGImageRef xMask = nullptr;
     if (m_pUserBuffer.get() && (nX + nWidth <= mnWidth) && (nY + nHeight <= mnHeight))
@@ -922,9 +922,9 @@ CGImageRef QuartzSalBitmap::CreateColorMask( int nX, int nY, int nWidth,
         {
             sal_uInt32 nColor;
             reinterpret_cast<sal_uInt8*>(&nColor)[0] = 0xff;
-            reinterpret_cast<sal_uInt8*>(&nColor)[1] = SALCOLOR_RED( nMaskColor );
-            reinterpret_cast<sal_uInt8*>(&nColor)[2] = SALCOLOR_GREEN( nMaskColor );
-            reinterpret_cast<sal_uInt8*>(&nColor)[3] = SALCOLOR_BLUE( nMaskColor );
+            reinterpret_cast<sal_uInt8*>(&nColor)[1] = nMaskColor.GetRed();
+            reinterpret_cast<sal_uInt8*>(&nColor)[2] = nMaskColor.GetGreen();
+            reinterpret_cast<sal_uInt8*>(&nColor)[3] = nMaskColor.GetBlue();
 
             sal_uInt8* pSource = m_pUserBuffer.get();
             if( nY )
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index a6c9a528bff7..7ee45db62aef 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -272,10 +272,10 @@ SalGraphicsImpl* AquaSalGraphics::GetImpl() const
     return nullptr;
 }
 
-void AquaSalGraphics::SetTextColor( SalColor nSalColor )
+void AquaSalGraphics::SetTextColor( Color nColor )
 {
-    maTextColor = RGBAColor( nSalColor );
-    // SAL_ DEBUG(std::hex << nSalColor << std::dec << "={" << maTextColor.GetRed() << ", " << maTextColor.GetGreen() << ", " << maTextColor.GetBlue() << ", " << maTextColor.GetAlpha() << "}");
+    maTextColor = RGBAColor( nColor );
+    // SAL_ DEBUG(std::hex << nColor << std::dec << "={" << maTextColor.GetRed() << ", " << maTextColor.GetGreen() << ", " << maTextColor.GetBlue() << ", " << maTextColor.GetAlpha() << "}");
 }
 
 void AquaSalGraphics::GetFontMetric(ImplFontMetricDataRef& rxFontMetric, int nFallbackLevel)
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 76644b4f0a11..11643e4f16cd 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -481,18 +481,18 @@ static void getBoundRect( sal_uInt32 nPoints, const SalPoint *pPtAry,
     rHeight = nY2 - nY1 + 1;
 }
 
-static SalColor ImplGetROPSalColor( SalROPColor nROPColor )
+static Color ImplGetROPColor( SalROPColor nROPColor )
 {
-    SalColor nSalColor;
+    Color nColor;
     if ( nROPColor == SalROPColor::N0 )
     {
-        nSalColor = MAKE_SALCOLOR( 0, 0, 0 );
+        nColor = Color( 0, 0, 0 );
     }
     else
     {
-        nSalColor = MAKE_SALCOLOR( 255, 255, 255 );
+        nColor = Color( 255, 255, 255 );
     }
-    return nSalColor;
+    return nColor;
 }
 
 // apply the XOR mask to the target context if active and dirty
@@ -901,7 +901,7 @@ void AquaSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
     DBG_DRAW_OPERATION_EXIT("drawLine");
 }
 
-void AquaSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap, SalColor nMaskColor )
+void AquaSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap, Color nMaskColor )
 {
     DBG_DRAW_OPERATION("drawMask",);
 
@@ -937,9 +937,9 @@ void AquaSalGraphics::drawPixel( long nX, long nY )
     ImplDrawPixel( nX, nY, maLineColor );
 }
 
-void AquaSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
+void AquaSalGraphics::drawPixel( long nX, long nY, Color nColor )
 {
-    const RGBAColor aPixelColor( nSalColor );
+    const RGBAColor aPixelColor( nColor );
     ImplDrawPixel( nX, nY, aPixelColor );
 }
 
@@ -1487,7 +1487,7 @@ long AquaSalGraphics::GetGraphicsWidth() const
     return w;
 }
 
-SalColor AquaSalGraphics::getPixel( long nX, long nY )
+Color AquaSalGraphics::getPixel( long nX, long nY )
 {
     // return default value on printers or when out of bounds
     if( !mxLayer || (nX < 0) || (nX >= mnWidth) ||
@@ -1527,8 +1527,8 @@ SalColor AquaSalGraphics::getPixel( long nX, long nY )
     SAL_INFO( "vcl.cg", "CGContextRelease(" << xOnePixelContext << ")" );
     CGContextRelease( xOnePixelContext );
 
-    SalColor nSalColor = MAKE_SALCOLOR( aPixel.r, aPixel.g, aPixel.b );
-    return nSalColor;
+    Color nColor( aPixel.r, aPixel.g, aPixel.b );
+    return nColor;
 }
 
 void AquaSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
@@ -1838,9 +1838,9 @@ void AquaSalGraphics::SetLineColor()
     }
 }
 
-void AquaSalGraphics::SetLineColor( SalColor nSalColor )
+void AquaSalGraphics::SetLineColor( Color nColor )
 {
-    maLineColor = RGBAColor( nSalColor );
+    maLineColor = RGBAColor( nColor );
     if( CheckContext() )
     {
         SAL_INFO( "vcl.cg", "CGContextSetRGBStrokeColor(" << mrContext << "," << maLineColor << ")" );
@@ -1860,9 +1860,9 @@ void AquaSalGraphics::SetFillColor()
     }
 }
 
-void AquaSalGraphics::SetFillColor( SalColor nSalColor )
+void AquaSalGraphics::SetFillColor( Color nColor )
 {
-    maFillColor = RGBAColor( nSalColor );
+    maFillColor = RGBAColor( nColor );
     if( CheckContext() )
     {
         SAL_INFO( "vcl.cg", "CGContextSetRGBFillColor(" << mrContext << "," << maFillColor << ")" );
@@ -1940,7 +1940,7 @@ void AquaSalGraphics::SetROPFillColor( SalROPColor nROPColor )
 {
     if( ! mbPrinter )
     {
-        SetFillColor( ImplGetROPSalColor( nROPColor ) );
+        SetFillColor( ImplGetROPColor( nROPColor ) );
     }
 }
 
@@ -1948,7 +1948,7 @@ void AquaSalGraphics::SetROPLineColor( SalROPColor nROPColor )
 {
     if( ! mbPrinter )
     {
-        SetLineColor( ImplGetROPSalColor( nROPColor ) );
+        SetLineColor( ImplGetROPColor( nROPColor ) );
     }
 }
 
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 48fb33ed5a6c..49cc105d5d54 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -373,11 +373,11 @@ void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev )
     drawPixel( nX, nY );
 }
 
-void SalGraphics::DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev )
+void SalGraphics::DrawPixel( long nX, long nY, Color nColor, const OutputDevice *pOutDev )
 {
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
         mirror( nX, pOutDev );
-    drawPixel( nX, nY, nSalColor );
+    drawPixel( nX, nY, nColor );
 }
 
 void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev )
@@ -594,7 +594,7 @@ void SalGraphics::DrawBitmap( const SalTwoRect& rPosAry,
 
 void SalGraphics::DrawMask( const SalTwoRect& rPosAry,
                             const SalBitmap& rSalBitmap,
-                            SalColor nMaskColor, const OutputDevice *pOutDev )
+                            Color nMaskColor, const OutputDevice *pOutDev )
 {
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
     {
@@ -613,7 +613,7 @@ SalBitmap* SalGraphics::GetBitmap( long nX, long nY, long nWidth, long nHeight,
     return getBitmap( nX, nY, nWidth, nHeight );
 }
 
-SalColor SalGraphics::GetPixel( long nX, long nY, const OutputDevice *pOutDev )
+Color SalGraphics::GetPixel( long nX, long nY, const OutputDevice *pOutDev )
 {
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
         mirror( nX, pOutDev );
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index ca02fba67e96..71c6eb8b9b19 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -332,7 +332,7 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
         nGreen      = static_cast<sal_uInt8>(nStartGreen);
         nBlue       = static_cast<sal_uInt8>(nStartBlue);
 
-        mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
+        mpGraphics->SetFillColor( Color( nRed, nGreen, nBlue ) );
 
         aBorderRect.SetBottom( static_cast<long>( aBorderRect.Top() + fBorder ) );
         aRect.SetTop( aBorderRect.Bottom() );
@@ -394,7 +394,7 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
         fTempColor = static_cast<double>(nStartBlue) * (1.0-fAlpha) + static_cast<double>(nEndBlue) * fAlpha;
         nBlue = GetGradientColorValue(static_cast<long>(fTempColor));
 
-        mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
+        mpGraphics->SetFillColor( Color( nRed, nGreen, nBlue ) );
 
         // Polygon for this color step
         aRect.SetTop( static_cast<long>( fGradientLine + static_cast<double>(i) * fScanInc ) );
@@ -428,7 +428,7 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
     nGreen = GetGradientColorValue(nEndGreen);
     nBlue = GetGradientColorValue(nEndBlue);
 
-    mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
+    mpGraphics->SetFillColor( Color( nRed, nGreen, nBlue ) );
 
     aRect.SetTop( static_cast<long>( fGradientLine + static_cast<double>(nSteps) * fScanInc ) );
     aRect.SetBottom( static_cast<long>( fMirrorGradientLine - static_cast<double>(nSteps) * fScanInc ) );
@@ -517,7 +517,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
     sal_uInt8   nRed = static_cast<sal_uInt8>(nStartRed), nGreen = static_cast<sal_uInt8>(nStartGreen), nBlue = static_cast<sal_uInt8>(nStartBlue);
     bool    bPaintLastPolygon( false ); // #107349# Paint last polygon only if loop has generated any output
 
-    mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
+    mpGraphics->SetFillColor( Color( nRed, nGreen, nBlue ) );
 
     if( xPolyPoly )
     {
@@ -579,12 +579,12 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
             // full aPoly. Thus, here, we're painting the band before
             // the one painted in the window outdev path below. To get
             // matching colors, have to delay color setting here.
-            mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
+            mpGraphics->SetFillColor( Color( nRed, nGreen, nBlue ) );
         }
         else
         {
             // #107349# Set fill color _before_ geometry painting
-            mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
+            mpGraphics->SetFillColor( Color( nRed, nGreen, nBlue ) );
 
             ImplDrawPolygon( aPoly, pClixPolyPoly );
         }
@@ -607,7 +607,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
                 nBlue = GetGradientColorValue( nEndBlue );
             }
 
-            mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
+            mpGraphics->SetFillColor( Color( nRed, nGreen, nBlue ) );
             ImplDrawPolygon( rPoly, pClixPolyPoly );
         }
     }
diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx
index 6c52a544d394..6a5e619ede8e 100644
--- a/vcl/source/outdev/mask.cxx
+++ b/vcl/source/outdev/mask.cxx
@@ -128,11 +128,11 @@ void OutputDevice::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
                 Bitmap aTmp( rMask );
                 aTmp.Mirror( nMirrFlags );
                 mpGraphics->DrawMask( aPosAry, *aTmp.ImplGetImpBitmap()->ImplGetSalBitmap(),
-                                      ImplColorToSal( rMaskColor ) , this);
+                                      rMaskColor, this);
             }
             else
                 mpGraphics->DrawMask( aPosAry, *xImpBmp->ImplGetSalBitmap(),
-                                      ImplColorToSal( rMaskColor ), this );
+                                      rMaskColor, this );
 
         }
     }
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index fa4ee99a82a4..38698b210330 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -586,7 +586,7 @@ void OutputDevice::InitLineColor()
         else if( RasterOp::Invert == meRasterOp )
             mpGraphics->SetROPLineColor( SalROPColor::Invert );
         else
-            mpGraphics->SetLineColor( ImplColorToSal( maLineColor ) );
+            mpGraphics->SetLineColor( maLineColor );
     }
     else
         mpGraphics->SetLineColor();
@@ -608,7 +608,7 @@ void OutputDevice::InitFillColor()
         else if( RasterOp::Invert == meRasterOp )
             mpGraphics->SetROPFillColor( SalROPColor::Invert );
         else
-            mpGraphics->SetFillColor( ImplColorToSal( maFillColor ) );
+            mpGraphics->SetFillColor( maFillColor );
     }
     else
         mpGraphics->SetFillColor();
diff --git a/vcl/source/outdev/pixel.cxx b/vcl/source/outdev/pixel.cxx
index afa4673cce33..04f35b41e777 100644
--- a/vcl/source/outdev/pixel.cxx
+++ b/vcl/source/outdev/pixel.cxx
@@ -33,7 +33,6 @@
 
 Color OutputDevice::GetPixel( const Point& rPt ) const
 {
-
     Color aColor;
 
     if ( mpGraphics || AcquireGraphics() )
@@ -45,10 +44,7 @@ Color OutputDevice::GetPixel( const Point& rPt ) const
         {
             const long nX = ImplLogicXToDevicePixel( rPt.X() );
             const long nY = ImplLogicYToDevicePixel( rPt.Y() );
-            const SalColor aSalCol = mpGraphics->GetPixel( nX, nY, this );
-            aColor.SetRed( SALCOLOR_RED( aSalCol ) );
-            aColor.SetGreen( SALCOLOR_GREEN( aSalCol ) );
-            aColor.SetBlue( SALCOLOR_BLUE( aSalCol ) );
+            aColor = mpGraphics->GetPixel( nX, nY, this );
         }
     }
     return aColor;
@@ -107,7 +103,7 @@ void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor )
     if ( mbOutputClipped )
         return;
 
-    mpGraphics->DrawPixel( aPt.X(), aPt.Y(), ImplColorToSal( aColor ), this );
+    mpGraphics->DrawPixel( aPt.X(), aPt.Y(), aColor, this );
 
     if( mpAlphaVDev )
         mpAlphaVDev->DrawPixel( rPt );
@@ -150,7 +146,7 @@ void OutputDevice::DrawPixel( const tools::Polygon& rPts, const Color* pColors )
                 for ( sal_uInt16 i = 0; i < nSize; i++ )
                 {
                     const Point aPt( ImplLogicToDevicePixel( rPts[ i ] ) );
-                    mpGraphics->DrawPixel( aPt.X(), aPt.Y(), ImplColorToSal( pColors[ i ] ), this );
+                    mpGraphics->DrawPixel( aPt.X(), aPt.Y(), pColors[ i ], this );
                 }
             }
         }
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 204feccc9da6..a3547b1bb491 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -69,7 +69,7 @@ void OutputDevice::ImplInitTextColor()
 
     if ( mbInitTextColor )
     {
-        mpGraphics->SetTextColor( ImplColorToSal( GetTextColor() ) );
+        mpGraphics->SetTextColor( GetTextColor() );
         mbInitTextColor = false;
     }
 }
@@ -145,7 +145,7 @@ void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout )
         mpGraphics->SetLineColor();
         mbInitLineColor = true;
     }
-    mpGraphics->SetFillColor( ImplColorToSal( GetTextFillColor() ) );
+    mpGraphics->SetFillColor( GetTextFillColor() );
     mbInitFillColor = true;
 
     ImplDrawTextRect( nX, nY, 0, -(mpFontInstance->mxFontMetric->GetAscent() + mnEmphasisAscent),
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index a15b788f8b01..bff62fe6e660 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -100,7 +100,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
     // If the height is 1 pixel, it's enough output a line
     if ( (nLineWidth == 1) && (nHeight == 1) )
     {
-        mpGraphics->SetLineColor( ImplColorToSal( rColor ) );
+        mpGraphics->SetLineColor( rColor );
         mbInitLineColor = true;
 
         long nEndX = nStartX+nWidth;
@@ -132,7 +132,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
                 mpGraphics->SetLineColor();
                 mbInitLineColor = true;
             }
-            mpGraphics->SetFillColor( ImplColorToSal( rColor ) );
+            mpGraphics->SetFillColor( rColor );
             mbInitFillColor = true;
             bDrawPixAsRect  = true;
             nPixWidth       = nLineWidth;
@@ -140,7 +140,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
         }
         else
         {
-            mpGraphics->SetLineColor( ImplColorToSal( rColor ) );
+            mpGraphics->SetLineColor( rColor );
             mbInitLineColor = true;
             nPixWidth       = 1;
             nPixHeight      = 1;
@@ -350,7 +350,7 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY,
             mpGraphics->SetLineColor();
             mbInitLineColor = true;
         }
-        mpGraphics->SetFillColor( ImplColorToSal( aColor ) );
+        mpGraphics->SetFillColor( aColor );
         mbInitFillColor = true;
 
         long nLeft = nDistX;
@@ -557,7 +557,7 @@ void OutputDevice::ImplDrawStrikeoutLine( long nBaseX, long nBaseY,
             mpGraphics->SetLineColor();
             mbInitLineColor = true;
         }
-        mpGraphics->SetFillColor( ImplColorToSal( aColor ) );
+        mpGraphics->SetFillColor( aColor );
         mbInitFillColor = true;
 
         const long& nLeft = nDistX;
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index a8fb3c542a64..da1d1723a7df 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -82,9 +82,6 @@ typedef unsigned long Pixel;
 
 using namespace vcl_sal;
 
-#define SALCOLOR_WHITE      MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF )
-#define SALCOLOR_BLACK      MAKE_SALCOLOR( 0x00, 0x00, 0x00 )
-
 #ifdef DBG_UTIL
 inline const char *Null( const char *p ) { return p ? p : ""; }
 inline const char *GetEnv( const char *p ) { return Null( getenv( p ) ); }
@@ -100,10 +97,10 @@ inline double Hypothenuse( long w, long h )
 inline int ColorDiff( int r, int g, int b )
 { return (r*r)+(g*g)+(b*b); }
 
-inline int ColorDiff( SalColor c1, int r, int g, int b )
-{ return ColorDiff( static_cast<int>(SALCOLOR_RED  (c1))-r,
-                    static_cast<int>(SALCOLOR_GREEN(c1))-g,
-                    static_cast<int>(SALCOLOR_BLUE (c1))-b ); }
+inline int ColorDiff( Color c1, int r, int g, int b )
+{ return ColorDiff( static_cast<int>(c1.GetRed())-r,
+                    static_cast<int>(c1.GetGreen())-g,
+                    static_cast<int>(c1.GetBlue())-b ); }
 
 static int sal_Shift( Pixel nMask )
 {
@@ -2444,21 +2441,21 @@ SalVisual::~SalVisual()
     if( -1 == screen && VisualID(-1) == visualid ) delete visual;
 }
 
-// Converts the order of bytes of a Pixel into bytes of a SalColor
+// Converts the order of bytes of a Pixel into bytes of a Color
 // This is not reversible for the 6 XXXA
 
-// SalColor is RGB (ABGR) a=0xFF000000, r=0xFF0000, g=0xFF00, b=0xFF
+// Color is RGB (ABGR) a=0xFF000000, r=0xFF0000, g=0xFF00, b=0xFF
 
 #define SALCOLOR        RGB
 #define SALCOLORREVERSE BGR
 
-SalColor SalVisual::GetTCColor( Pixel nPixel ) const
+Color SalVisual::GetTCColor( Pixel nPixel ) const
 {
     if( SALCOLOR == eRGBMode_ )
-        return static_cast<SalColor>(nPixel);
+        return static_cast<Color>(nPixel);
 
     if( SALCOLORREVERSE == eRGBMode_ )
-        return MAKE_SALCOLOR( (nPixel & 0x0000FF),
+        return Color( (nPixel & 0x0000FF),
                               (nPixel & 0x00FF00) >>  8,
                               (nPixel & 0xFF0000) >> 16);
 
@@ -2467,7 +2464,7 @@ SalColor SalVisual::GetTCColor( Pixel nPixel ) const
     Pixel b = nPixel & blue_mask;
 
     if( otherSalRGB != eRGBMode_ ) // 8+8+8=24
-        return MAKE_SALCOLOR( r >> nRedShift_,
+        return Color( r >> nRedShift_,
                               g >> nGreenShift_,
                               b >> nBlueShift_ );
 
@@ -2482,17 +2479,17 @@ SalColor SalVisual::GetTCColor( Pixel nPixel ) const
     if( nBlueBits_ != 8 )
         b |= (b & 0xff) >> (8-nBlueBits_);
 
-    return MAKE_SALCOLOR( r, g, b );
+    return Color( r, g, b );
 }
 
-Pixel SalVisual::GetTCPixel( SalColor nSalColor ) const
+Pixel SalVisual::GetTCPixel( Color nColor ) const
 {
     if( SALCOLOR == eRGBMode_ )
-        return static_cast<Pixel>(nSalColor);
+        return static_cast<Pixel>(sal_uInt32(nColor));
 
-    Pixel r = static_cast<Pixel>(SALCOLOR_RED( nSalColor ));
-    Pixel g = static_cast<Pixel>(SALCOLOR_GREEN( nSalColor ));
-    Pixel b = static_cast<Pixel>(SALCOLOR_BLUE( nSalColor ));
+    Pixel r = static_cast<Pixel>( nColor.GetRed() );
+    Pixel g = static_cast<Pixel>( nColor.GetGreen() );
+    Pixel b = static_cast<Pixel>( nColor.GetBlue() );
 
     if( SALCOLORREVERSE == eRGBMode_ )
         return (b << 16) | (g << 8) | r;
@@ -2582,10 +2579,10 @@ SalColormap::SalColormap()

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list