diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,14 @@
 Changes
 =======
 
+Version 0.10
+------------
+
+* Add support for setting the default color with new `SetDefaultColor`
+  constructor of the `SGR` type.
+* `getTerminalSize` now flushes the `stdout` channel, to ensure the cursor
+  position is unaffected.
+
 Version 0.9.1
 -------------
 
@@ -11,7 +19,7 @@
 -----------
 
 * Add support for 256-color palettes with new `SetPaletteColor` constructor of
-  `SGR` type, and `xterm6LevelRGB`, `xterm24LevelGray` and `xtermSystem`.
+  the `SGR` type, and `xterm6LevelRGB`, `xterm24LevelGray` and `xtermSystem`.
 * Remove deprecated `getCursorPosition`. (Use `getCursorPosition0` instead.)
 * Add `hSupportsANSIColor`.
 * Add `getTerminalSize`.
diff --git a/ansi-terminal.cabal b/ansi-terminal.cabal
--- a/ansi-terminal.cabal
+++ b/ansi-terminal.cabal
@@ -1,5 +1,5 @@
 Name:                ansi-terminal
-Version:             0.9.1
+Version:             0.10
 Cabal-Version:       >= 1.8
 Category:            User Interfaces
 Synopsis:            Simple ANSI terminal support, with Windows compatibility
diff --git a/src/System/Console/ANSI/Codes.hs b/src/System/Console/ANSI/Codes.hs
--- a/src/System/Console/ANSI/Codes.hs
+++ b/src/System/Console/ANSI/Codes.hs
@@ -121,6 +121,8 @@
   SetPaletteColor Background index -> [48, 5, fromIntegral index]
   SetRGBColor Foreground color -> [38, 2] ++ toRGB color
   SetRGBColor Background color -> [48, 2] ++ toRGB color
+  SetDefaultColor Foreground -> [39]
+  SetDefaultColor Background -> [49]
  where
   toRGB color = let RGB r g b = toSRGB24 color
                 in  map fromIntegral [r, g, b]
diff --git a/src/System/Console/ANSI/Types.hs b/src/System/Console/ANSI/Types.hs
--- a/src/System/Console/ANSI/Types.hs
+++ b/src/System/Console/ANSI/Types.hs
@@ -132,6 +132,10 @@
   --
   -- @since 0.9
   | SetPaletteColor !ConsoleLayer !Word8
+  -- | Set a color to the default (implementation-defined)
+  --
+  -- @since 0.10
+  | SetDefaultColor !ConsoleLayer
   deriving (Eq, Show, Read)
 
 -- | Given xterm's standard protocol for a 256-color palette, returns the index
diff --git a/src/System/Console/ANSI/Unix.hs b/src/System/Console/ANSI/Unix.hs
--- a/src/System/Console/ANSI/Unix.hs
+++ b/src/System/Console/ANSI/Unix.hs
@@ -10,9 +10,8 @@
   ) where
 
 import Control.Exception.Base (bracket)
-import System.IO (BufferMode (..), Handle, hFlush, hGetBuffering, hGetEcho,
-  hIsTerminalDevice, hIsWritable, hPutStr, hSetBuffering, hSetEcho, stdin,
-  stdout)
+import System.IO (BufferMode (..), Handle, hGetBuffering, hGetEcho,
+  hIsTerminalDevice, hIsWritable, hPutStr, hSetBuffering, hSetEcho, stdin)
 import Text.ParserCombinators.ReadP (readP_to_S)
 
 import System.Console.ANSI.Codes
diff --git a/src/System/Console/ANSI/Windows.hs b/src/System/Console/ANSI/Windows.hs
--- a/src/System/Console/ANSI/Windows.hs
+++ b/src/System/Console/ANSI/Windows.hs
@@ -9,7 +9,7 @@
 #include "Exports-Include.hs"
   ) where
 
-import System.IO (Handle, stdout)
+import System.IO (Handle)
 
 import System.Console.ANSI.Types
 import qualified System.Console.ANSI.Unix as U
diff --git a/src/System/Console/ANSI/Windows/Emulator.hs b/src/System/Console/ANSI/Windows/Emulator.hs
--- a/src/System/Console/ANSI/Windows/Emulator.hs
+++ b/src/System/Console/ANSI/Windows/Emulator.hs
@@ -14,7 +14,7 @@
 import Data.List (foldl', minimumBy)
 import Data.Maybe (mapMaybe)
 import qualified Data.Map.Strict as Map (Map, empty, insert, lookup)
-import System.IO (Handle, hFlush, hIsTerminalDevice, stdin, stdout)
+import System.IO (Handle, hIsTerminalDevice, stdin)
 import System.IO.Unsafe (unsafePerformIO)
 import Text.ParserCombinators.ReadP (readP_to_S)
 
@@ -263,6 +263,12 @@
 applyANSISGRToAttribute :: WORD -> SGR -> WORD -> WORD
 applyANSISGRToAttribute def sgr attribute = case sgr of
   Reset -> def
+  SetDefaultColor Foreground ->
+    (attribute .&. complement fOREGROUND_INTENSE_WHITE) .|.
+    (def .&. fOREGROUND_INTENSE_WHITE)
+  SetDefaultColor Background ->
+    (attribute .&. complement bACKGROUND_INTENSE_WHITE) .|.
+    (def .&. bACKGROUND_INTENSE_WHITE)
   SetConsoleIntensity intensity -> case intensity of
     BoldIntensity   -> attribute .|. iNTENSITY
     FaintIntensity  -> attribute .&. (complement iNTENSITY) -- Not supported
diff --git a/src/includes/Common-Include.hs b/src/includes/Common-Include.hs
--- a/src/includes/Common-Include.hs
+++ b/src/includes/Common-Include.hs
@@ -12,6 +12,7 @@
 import Data.Char (isDigit)
 import Data.Functor ((<$>))
 import System.Environment (getEnvironment)
+import System.IO (hFlush, stdout)
 import Text.ParserCombinators.ReadP (char, many1, ReadP, satisfy)
 
 hCursorUp, hCursorDown, hCursorForward, hCursorBackward
@@ -254,4 +255,6 @@
                              -- bottom right corner of the terminal.
   mPos <- getCursorPosition0
   restoreCursor
+  hFlush stdout -- ensure the restore cursor position code is sent to the
+                -- operating system
   return $ fmap (\(r, c) -> (r + 1, c + 1)) mPos
