How to implement module dependencies in a theme and package modules with a theme? If you're making a theme and associated custom modules designed for that theme and no other theme. Is there a way to package the modules with the theme so that when the theme is activated the modules will show up in the module list ready to be activated? The custom modules are build for the theme and so if they can be packaged with the theme that would make it simple to distribute. 

I would like to avoid the problems of the user not being able to fully use the theme due to a missing library or module.

If a theme and collection of modules that are packaged in a single zip file, when passed to the drupal installer, permit Drupal the ability to extract the theme and modules to the correct locations? Can it determine the themes dependencies and then install the modules from a url?

Some examples that I can think of is having color pickers for a theme so you can select different colors for the theme in the settings area. I could make custom modules for this and have the modules show up if the theme is active. Maybe also have it alert the user to activate the modules one theme activation. If the theme has a custom slideshow should this be built into the theme or maybe as a packaged module inside the theme that shows up as a module in the modules list to be activated. 

Maybe inside the theme package it could have a modules folder that Drupal could then extract the modules and install them into the module directory. On uninstall could prompt the user if they would like to also uninstall the associated modules. If this is possible (or soon to be) this would make managing complex themes clean and simple. It would also keep the module list clean as well. maybe some dependency in the theme info file?

Other thoughts would be if a theme was active maybe it could find said modules and inject rendering options into the modules configurations options.

As of right now this is just a curiosity of mine and I wonder if it could be done. This idea came about after setting up many Drupal sites and making custom modules and themes. Then it hit me what if I could do more with my custom themes by knowing it can only run if all the needed modules where there. Then I wouldn't have to worry about a bad user experience.
Up to Drupal version 7, themes do not allow to have the typical directive for module dependencies in their info files. Because themes are supposed to be module independent.

However, for D8, there is the issue about dependencies[] for themes, so they can depend on modules (created back in 2009 ... current status = needs work).

For D7, Comment #3 in (Drupal core) issue 647014 contains a possible work around that you may want to consider, something like so:

&lt;?php
function mytheme_preprocess_page(&amp;$vars)
{
  ...
  if (!module_exists('needed_module'))
  {
    // No needed_module means we need to add it, let everyone know.
    //
    print "&lt;h1&gt;"  . t( 'mytheme requires that module needed_module is installed')
        . "&lt;/h1&gt;"
        . "&lt;h6&gt;"  . t( 'warning generated in file: %f', array ( '%f'=&gt;__FILE__ ))
        . "&lt;/h6&gt;";
  }
  ...
}
?&gt;