Change cell color in matrixTikZ change matrix cell color backgroundHow to define the default vertical distance between nodes?Table cell color overlaps cell borderCell color partially overriding cell borderTikZ/ERD: node (=Entity) label on the insideChange Color of Proofhow to change color of matrix bracketChange color of sectionsColor cell in tableColor fraction of table cell

Why is the ladder of the LM always in the dark side of the LM?

Why did Harry Potter get a bedroom?

Is this a reference to the film Alien in the novel 2010 Odyssey Two?

Why did Old English lose both thorn and eth?

Is there a way I can open the Windows 10 Ubuntu bash without running the ~/.bashrc script?

Were Pandaria, Broken Isles, Northrend, Kul'Tiras and Zandalar also affected by the Cataclysm?

Why does wrapping Aluminium foil around my food help it keep warm, aluminium be good conductor should have no effect?

Is system.schedule(...) @AuraEnabled?

The origin of a particular self-reference paradox

What happens when adult Billy Batson says "Shazam"?

What could cause the sea level to massively decrease?

Is it possible to set permissions on schema fields to restrict editing of them to certain users?

How do you move up one folder in Finder?

Should I include code in my research paper?

When an electron changes its spin, or any other intrinsic property, is it still the same electron?

What is the right approach to quit a job during probation period for a competing offer?

To what extent would a wizard be able to combine feats to learn to mimic unknown spells?

What adjective means "accurately representitive of reality"?

Through: how to use it with subtraction of functions?

What the real concept of Static keyword in perspective of Embedded C. See below code

What is the minimum time required for final wash in film development?

Given a 32 bit number, what is an efficient way to scale each byte by a certain factor?

Having decision making power over someone's assets

What is /bin/red



Change cell color in matrix


TikZ change matrix cell color backgroundHow to define the default vertical distance between nodes?Table cell color overlaps cell borderCell color partially overriding cell borderTikZ/ERD: node (=Entity) label on the insideChange Color of Proofhow to change color of matrix bracketChange color of sectionsColor cell in tableColor fraction of table cell






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I am trying to color the empty cells from the first matrix with grey (definecolorgreyRGB220,250,250)but I don't know why it does not work. Any suggestions?



documentclassstandalone
%usepackage[showframe]geometry
usepackagetikz
definecolorgrisRGB250,250,250
usepackagelmodern
usetikzlibrarymatrix,
positioning
tikzset
mymatrix/.style = matrix of nodes,
nodes in empty cells,
nodes=minimum height=3ex, minimum width=1em,
inner sep=0pt, outer sep=0pt, anchor=center,
draw, very thin,scale=0.8,transform shape,
column sep=0pt,
row sep=0pt,
inner sep=0.5pgflinewidth, outer sep=1pt,
draw, thick,
empty node/.style = draw,fill=grey,
every label/.append style = font=large, text=teal

makeatletter
deftikz@lib@matrix@empty@cell%
iftikz@lib@matrix@empty%
node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
makeatother

usepackagebm
newcommandMatrixVariable[1]bm#1



definecolorblueRGB180, 171, 250
definecolorgreyRGB250,250,250

begindocument

begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
shape]
matrix (m1) [mymatrix,
label=[rotate=90, anchor=south,black]left: Movies,
label=[black]below:$MatrixVariableR$,
label=[black]above:Users,
nodes=fill=blue]

1 & & 3 & & & 5 & & & 5 & & 4 & \
& & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
& 2 & 4 & & 5 & & & 4 & & & 2 & \
& & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
1 & & 3 & & 3 & & & 2 & & & 4 & \
;
node (approx) [right=of m1,scale=2] $approx$;
matrix (m2) [mymatrix=none, right=0.1em of approx,
label=[rotate=90, anchor=south east,xshift=-0.7em,black]left: Movies,
label=[black]below:$MatrixVariableQ$,
label=[black]above:$f$-factors,
nodes=minimum width=2.2em,fill=grey]

0.1& -0.4 & -0.2 \
-0.5& 0.6 & 0.5 \
-0.2& 0.3 &0.5 \
1.1& 2.1 & 0.3 \
-0.7&2.1 & -2 \
-1& 0.7 & 0.3 \
;
node (times) [right=of m2,scale=2] $cdot$;
matrix (m3) [mymatrix=none, right=of times,
label=[rotate=90, anchor=north,black]right: $f$-factors,
label=[black]below:$MatrixVariableP^T$,
label=[black]above:Users,
nodes=minimum width=2em,fill=grey]

1.1&-2 & 0.3 & 0.5 &-2 & -0.5 & 0.8 & -0.4 & 0.3 & 1.4 & 2.4 & -0.9\
-0.8& 0.7 & 0.5 & 1.4 &0.3 & -1 & 1.4 & 2.9 & 0.7 & - 1.2 & 1.3& 0.4\
2.1& -0.4 & 0.6 & 1.7 & 2.4 & 0.9 & -0.3 & 0.4 & 0.8 & 0.7 & -0.6&0.1 \
;
endtikzpicture

enddocument


enter image description here










share|improve this question






























    2















    I am trying to color the empty cells from the first matrix with grey (definecolorgreyRGB220,250,250)but I don't know why it does not work. Any suggestions?



    documentclassstandalone
    %usepackage[showframe]geometry
    usepackagetikz
    definecolorgrisRGB250,250,250
    usepackagelmodern
    usetikzlibrarymatrix,
    positioning
    tikzset
    mymatrix/.style = matrix of nodes,
    nodes in empty cells,
    nodes=minimum height=3ex, minimum width=1em,
    inner sep=0pt, outer sep=0pt, anchor=center,
    draw, very thin,scale=0.8,transform shape,
    column sep=0pt,
    row sep=0pt,
    inner sep=0.5pgflinewidth, outer sep=1pt,
    draw, thick,
    empty node/.style = draw,fill=grey,
    every label/.append style = font=large, text=teal

    makeatletter
    deftikz@lib@matrix@empty@cell%
    iftikz@lib@matrix@empty%
    node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
    makeatother

    usepackagebm
    newcommandMatrixVariable[1]bm#1



    definecolorblueRGB180, 171, 250
    definecolorgreyRGB250,250,250

    begindocument

    begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
    shape]
    matrix (m1) [mymatrix,
    label=[rotate=90, anchor=south,black]left: Movies,
    label=[black]below:$MatrixVariableR$,
    label=[black]above:Users,
    nodes=fill=blue]

    1 & & 3 & & & 5 & & & 5 & & 4 & \
    & & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
    2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
    & 2 & 4 & & 5 & & & 4 & & & 2 & \
    & & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
    1 & & 3 & & 3 & & & 2 & & & 4 & \
    ;
    node (approx) [right=of m1,scale=2] $approx$;
    matrix (m2) [mymatrix=none, right=0.1em of approx,
    label=[rotate=90, anchor=south east,xshift=-0.7em,black]left: Movies,
    label=[black]below:$MatrixVariableQ$,
    label=[black]above:$f$-factors,
    nodes=minimum width=2.2em,fill=grey]

    0.1& -0.4 & -0.2 \
    -0.5& 0.6 & 0.5 \
    -0.2& 0.3 &0.5 \
    1.1& 2.1 & 0.3 \
    -0.7&2.1 & -2 \
    -1& 0.7 & 0.3 \
    ;
    node (times) [right=of m2,scale=2] $cdot$;
    matrix (m3) [mymatrix=none, right=of times,
    label=[rotate=90, anchor=north,black]right: $f$-factors,
    label=[black]below:$MatrixVariableP^T$,
    label=[black]above:Users,
    nodes=minimum width=2em,fill=grey]

    1.1&-2 & 0.3 & 0.5 &-2 & -0.5 & 0.8 & -0.4 & 0.3 & 1.4 & 2.4 & -0.9\
    -0.8& 0.7 & 0.5 & 1.4 &0.3 & -1 & 1.4 & 2.9 & 0.7 & - 1.2 & 1.3& 0.4\
    2.1& -0.4 & 0.6 & 1.7 & 2.4 & 0.9 & -0.3 & 0.4 & 0.8 & 0.7 & -0.6&0.1 \
    ;
    endtikzpicture

    enddocument


    enter image description here










    share|improve this question


























      2












      2








      2


      1






      I am trying to color the empty cells from the first matrix with grey (definecolorgreyRGB220,250,250)but I don't know why it does not work. Any suggestions?



      documentclassstandalone
      %usepackage[showframe]geometry
      usepackagetikz
      definecolorgrisRGB250,250,250
      usepackagelmodern
      usetikzlibrarymatrix,
      positioning
      tikzset
      mymatrix/.style = matrix of nodes,
      nodes in empty cells,
      nodes=minimum height=3ex, minimum width=1em,
      inner sep=0pt, outer sep=0pt, anchor=center,
      draw, very thin,scale=0.8,transform shape,
      column sep=0pt,
      row sep=0pt,
      inner sep=0.5pgflinewidth, outer sep=1pt,
      draw, thick,
      empty node/.style = draw,fill=grey,
      every label/.append style = font=large, text=teal

      makeatletter
      deftikz@lib@matrix@empty@cell%
      iftikz@lib@matrix@empty%
      node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
      makeatother

      usepackagebm
      newcommandMatrixVariable[1]bm#1



      definecolorblueRGB180, 171, 250
      definecolorgreyRGB250,250,250

      begindocument

      begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
      shape]
      matrix (m1) [mymatrix,
      label=[rotate=90, anchor=south,black]left: Movies,
      label=[black]below:$MatrixVariableR$,
      label=[black]above:Users,
      nodes=fill=blue]

      1 & & 3 & & & 5 & & & 5 & & 4 & \
      & & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
      2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
      & 2 & 4 & & 5 & & & 4 & & & 2 & \
      & & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
      1 & & 3 & & 3 & & & 2 & & & 4 & \
      ;
      node (approx) [right=of m1,scale=2] $approx$;
      matrix (m2) [mymatrix=none, right=0.1em of approx,
      label=[rotate=90, anchor=south east,xshift=-0.7em,black]left: Movies,
      label=[black]below:$MatrixVariableQ$,
      label=[black]above:$f$-factors,
      nodes=minimum width=2.2em,fill=grey]

      0.1& -0.4 & -0.2 \
      -0.5& 0.6 & 0.5 \
      -0.2& 0.3 &0.5 \
      1.1& 2.1 & 0.3 \
      -0.7&2.1 & -2 \
      -1& 0.7 & 0.3 \
      ;
      node (times) [right=of m2,scale=2] $cdot$;
      matrix (m3) [mymatrix=none, right=of times,
      label=[rotate=90, anchor=north,black]right: $f$-factors,
      label=[black]below:$MatrixVariableP^T$,
      label=[black]above:Users,
      nodes=minimum width=2em,fill=grey]

      1.1&-2 & 0.3 & 0.5 &-2 & -0.5 & 0.8 & -0.4 & 0.3 & 1.4 & 2.4 & -0.9\
      -0.8& 0.7 & 0.5 & 1.4 &0.3 & -1 & 1.4 & 2.9 & 0.7 & - 1.2 & 1.3& 0.4\
      2.1& -0.4 & 0.6 & 1.7 & 2.4 & 0.9 & -0.3 & 0.4 & 0.8 & 0.7 & -0.6&0.1 \
      ;
      endtikzpicture

      enddocument


      enter image description here










      share|improve this question
















      I am trying to color the empty cells from the first matrix with grey (definecolorgreyRGB220,250,250)but I don't know why it does not work. Any suggestions?



      documentclassstandalone
      %usepackage[showframe]geometry
      usepackagetikz
      definecolorgrisRGB250,250,250
      usepackagelmodern
      usetikzlibrarymatrix,
      positioning
      tikzset
      mymatrix/.style = matrix of nodes,
      nodes in empty cells,
      nodes=minimum height=3ex, minimum width=1em,
      inner sep=0pt, outer sep=0pt, anchor=center,
      draw, very thin,scale=0.8,transform shape,
      column sep=0pt,
      row sep=0pt,
      inner sep=0.5pgflinewidth, outer sep=1pt,
      draw, thick,
      empty node/.style = draw,fill=grey,
      every label/.append style = font=large, text=teal

      makeatletter
      deftikz@lib@matrix@empty@cell%
      iftikz@lib@matrix@empty%
      node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
      makeatother

      usepackagebm
      newcommandMatrixVariable[1]bm#1



      definecolorblueRGB180, 171, 250
      definecolorgreyRGB250,250,250

      begindocument

      begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
      shape]
      matrix (m1) [mymatrix,
      label=[rotate=90, anchor=south,black]left: Movies,
      label=[black]below:$MatrixVariableR$,
      label=[black]above:Users,
      nodes=fill=blue]

      1 & & 3 & & & 5 & & & 5 & & 4 & \
      & & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
      2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
      & 2 & 4 & & 5 & & & 4 & & & 2 & \
      & & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
      1 & & 3 & & 3 & & & 2 & & & 4 & \
      ;
      node (approx) [right=of m1,scale=2] $approx$;
      matrix (m2) [mymatrix=none, right=0.1em of approx,
      label=[rotate=90, anchor=south east,xshift=-0.7em,black]left: Movies,
      label=[black]below:$MatrixVariableQ$,
      label=[black]above:$f$-factors,
      nodes=minimum width=2.2em,fill=grey]

      0.1& -0.4 & -0.2 \
      -0.5& 0.6 & 0.5 \
      -0.2& 0.3 &0.5 \
      1.1& 2.1 & 0.3 \
      -0.7&2.1 & -2 \
      -1& 0.7 & 0.3 \
      ;
      node (times) [right=of m2,scale=2] $cdot$;
      matrix (m3) [mymatrix=none, right=of times,
      label=[rotate=90, anchor=north,black]right: $f$-factors,
      label=[black]below:$MatrixVariableP^T$,
      label=[black]above:Users,
      nodes=minimum width=2em,fill=grey]

      1.1&-2 & 0.3 & 0.5 &-2 & -0.5 & 0.8 & -0.4 & 0.3 & 1.4 & 2.4 & -0.9\
      -0.8& 0.7 & 0.5 & 1.4 &0.3 & -1 & 1.4 & 2.9 & 0.7 & - 1.2 & 1.3& 0.4\
      2.1& -0.4 & 0.6 & 1.7 & 2.4 & 0.9 & -0.3 & 0.4 & 0.8 & 0.7 & -0.6&0.1 \
      ;
      endtikzpicture

      enddocument


      enter image description here







      tikz-pgf color






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 7 hours ago







      NaveganTeX

















      asked 8 hours ago









      NaveganTeXNaveganTeX

      1,0391 silver badge10 bronze badges




      1,0391 silver badge10 bronze badges




















          1 Answer
          1






          active

          oldest

          votes


















          4














          You can just replace grey by gray in the tikzset of your empty nodes.



          documentclassstandalone
          %usepackage[showframe]geometry
          usepackagetikz

          usepackagelmodern
          usetikzlibrarymatrix,
          positioning
          tikzset
          mymatrix/.style = matrix of nodes,
          nodes in empty cells,
          nodes=minimum height=3ex, minimum width=1em,
          inner sep=0pt, outer sep=0pt, anchor=center,
          draw, very thin,scale=0.8,transform shape,
          column sep=0pt,
          row sep=0pt,
          inner sep=0.5pgflinewidth, outer sep=1pt,
          draw, thick,
          empty node/.style = draw,fill=gray,
          every label/.append style = font=large, text=teal

          makeatletter
          deftikz@lib@matrix@empty@cell%
          iftikz@lib@matrix@empty%
          node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
          makeatother

          usepackagebm
          newcommandMatrixVariable[1]bm#1



          definecolorblueRGB180, 171, 250


          begindocument

          begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
          shape]
          matrix (m1) [mymatrix,
          label=[rotate=90, anchor=south,black]left: Movies,
          label=[black]below:$MatrixVariableR$,
          label=[black]above:Users,
          nodes=fill=blue]

          1 & & 3 & & & 5 & & & 5 & & 4 & \
          & & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
          2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
          & 2 & 4 & & 5 & & & 4 & & & 2 & \
          & & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
          1 & & 3 & & 3 & & & 2 & & & 4 & \
          ;
          node (approx) [right=of m1,scale=2] $approx$;
          endtikzpicture

          enddocument


          to get:



          enter image description here




          Note: The triple RGB=250,250,250 will result in white color.







          share|improve this answer

























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "85"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f499114%2fchange-cell-color-in-matrix%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4














            You can just replace grey by gray in the tikzset of your empty nodes.



            documentclassstandalone
            %usepackage[showframe]geometry
            usepackagetikz

            usepackagelmodern
            usetikzlibrarymatrix,
            positioning
            tikzset
            mymatrix/.style = matrix of nodes,
            nodes in empty cells,
            nodes=minimum height=3ex, minimum width=1em,
            inner sep=0pt, outer sep=0pt, anchor=center,
            draw, very thin,scale=0.8,transform shape,
            column sep=0pt,
            row sep=0pt,
            inner sep=0.5pgflinewidth, outer sep=1pt,
            draw, thick,
            empty node/.style = draw,fill=gray,
            every label/.append style = font=large, text=teal

            makeatletter
            deftikz@lib@matrix@empty@cell%
            iftikz@lib@matrix@empty%
            node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
            makeatother

            usepackagebm
            newcommandMatrixVariable[1]bm#1



            definecolorblueRGB180, 171, 250


            begindocument

            begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
            shape]
            matrix (m1) [mymatrix,
            label=[rotate=90, anchor=south,black]left: Movies,
            label=[black]below:$MatrixVariableR$,
            label=[black]above:Users,
            nodes=fill=blue]

            1 & & 3 & & & 5 & & & 5 & & 4 & \
            & & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
            2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
            & 2 & 4 & & 5 & & & 4 & & & 2 & \
            & & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
            1 & & 3 & & 3 & & & 2 & & & 4 & \
            ;
            node (approx) [right=of m1,scale=2] $approx$;
            endtikzpicture

            enddocument


            to get:



            enter image description here




            Note: The triple RGB=250,250,250 will result in white color.







            share|improve this answer



























              4














              You can just replace grey by gray in the tikzset of your empty nodes.



              documentclassstandalone
              %usepackage[showframe]geometry
              usepackagetikz

              usepackagelmodern
              usetikzlibrarymatrix,
              positioning
              tikzset
              mymatrix/.style = matrix of nodes,
              nodes in empty cells,
              nodes=minimum height=3ex, minimum width=1em,
              inner sep=0pt, outer sep=0pt, anchor=center,
              draw, very thin,scale=0.8,transform shape,
              column sep=0pt,
              row sep=0pt,
              inner sep=0.5pgflinewidth, outer sep=1pt,
              draw, thick,
              empty node/.style = draw,fill=gray,
              every label/.append style = font=large, text=teal

              makeatletter
              deftikz@lib@matrix@empty@cell%
              iftikz@lib@matrix@empty%
              node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
              makeatother

              usepackagebm
              newcommandMatrixVariable[1]bm#1



              definecolorblueRGB180, 171, 250


              begindocument

              begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
              shape]
              matrix (m1) [mymatrix,
              label=[rotate=90, anchor=south,black]left: Movies,
              label=[black]below:$MatrixVariableR$,
              label=[black]above:Users,
              nodes=fill=blue]

              1 & & 3 & & & 5 & & & 5 & & 4 & \
              & & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
              2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
              & 2 & 4 & & 5 & & & 4 & & & 2 & \
              & & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
              1 & & 3 & & 3 & & & 2 & & & 4 & \
              ;
              node (approx) [right=of m1,scale=2] $approx$;
              endtikzpicture

              enddocument


              to get:



              enter image description here




              Note: The triple RGB=250,250,250 will result in white color.







              share|improve this answer

























                4












                4








                4







                You can just replace grey by gray in the tikzset of your empty nodes.



                documentclassstandalone
                %usepackage[showframe]geometry
                usepackagetikz

                usepackagelmodern
                usetikzlibrarymatrix,
                positioning
                tikzset
                mymatrix/.style = matrix of nodes,
                nodes in empty cells,
                nodes=minimum height=3ex, minimum width=1em,
                inner sep=0pt, outer sep=0pt, anchor=center,
                draw, very thin,scale=0.8,transform shape,
                column sep=0pt,
                row sep=0pt,
                inner sep=0.5pgflinewidth, outer sep=1pt,
                draw, thick,
                empty node/.style = draw,fill=gray,
                every label/.append style = font=large, text=teal

                makeatletter
                deftikz@lib@matrix@empty@cell%
                iftikz@lib@matrix@empty%
                node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
                makeatother

                usepackagebm
                newcommandMatrixVariable[1]bm#1



                definecolorblueRGB180, 171, 250


                begindocument

                begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
                shape]
                matrix (m1) [mymatrix,
                label=[rotate=90, anchor=south,black]left: Movies,
                label=[black]below:$MatrixVariableR$,
                label=[black]above:Users,
                nodes=fill=blue]

                1 & & 3 & & & 5 & & & 5 & & 4 & \
                & & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
                2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
                & 2 & 4 & & 5 & & & 4 & & & 2 & \
                & & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
                1 & & 3 & & 3 & & & 2 & & & 4 & \
                ;
                node (approx) [right=of m1,scale=2] $approx$;
                endtikzpicture

                enddocument


                to get:



                enter image description here




                Note: The triple RGB=250,250,250 will result in white color.







                share|improve this answer













                You can just replace grey by gray in the tikzset of your empty nodes.



                documentclassstandalone
                %usepackage[showframe]geometry
                usepackagetikz

                usepackagelmodern
                usetikzlibrarymatrix,
                positioning
                tikzset
                mymatrix/.style = matrix of nodes,
                nodes in empty cells,
                nodes=minimum height=3ex, minimum width=1em,
                inner sep=0pt, outer sep=0pt, anchor=center,
                draw, very thin,scale=0.8,transform shape,
                column sep=0pt,
                row sep=0pt,
                inner sep=0.5pgflinewidth, outer sep=1pt,
                draw, thick,
                empty node/.style = draw,fill=gray,
                every label/.append style = font=large, text=teal

                makeatletter
                deftikz@lib@matrix@empty@cell%
                iftikz@lib@matrix@empty%
                node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
                makeatother

                usepackagebm
                newcommandMatrixVariable[1]bm#1



                definecolorblueRGB180, 171, 250


                begindocument

                begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
                shape]
                matrix (m1) [mymatrix,
                label=[rotate=90, anchor=south,black]left: Movies,
                label=[black]below:$MatrixVariableR$,
                label=[black]above:Users,
                nodes=fill=blue]

                1 & & 3 & & & 5 & & & 5 & & 4 & \
                & & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
                2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
                & 2 & 4 & & 5 & & & 4 & & & 2 & \
                & & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
                1 & & 3 & & 3 & & & 2 & & & 4 & \
                ;
                node (approx) [right=of m1,scale=2] $approx$;
                endtikzpicture

                enddocument


                to get:



                enter image description here




                Note: The triple RGB=250,250,250 will result in white color.








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 7 hours ago









                RaajaRaaja

                5,5183 gold badges18 silver badges45 bronze badges




                5,5183 gold badges18 silver badges45 bronze badges



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f499114%2fchange-cell-color-in-matrix%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                    Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                    François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480